Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

Switched to eslint with prettier #3

Merged
merged 2 commits into from
Jun 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ insert_final_newline = true
end_of_line = lf
indent_style = space

[*.{js,ts,tsx,md,css}]
[*.{js,ts,md,css}]
indent_size = 4

[*.{json,yml}]
Expand Down
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/**
out/**
40 changes: 40 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
root: true
parser: '@typescript-eslint/parser'
parserOptions:
ecmaVersion: 6
sourceType: module
project:
- './tsconfig.json'
plugins:
- '@typescript-eslint'
extends:
- eslint:recommended
- plugin:@typescript-eslint/recommended
- plugin:@typescript-eslint/recommended-requiring-type-checking
- prettier/@typescript-eslint
- plugin:prettier/recommended
rules:
prettier/prettier:
- error
- bracketSpacing: true
singleQuote: false
quoteProps: as-needed
semi: true
endOfLine: auto
printWidth: 85
trailingComma: none
arrowParens: avoid

'@typescript-eslint/no-namespace': off
'@typescript-eslint/explicit-function-return-type': error
'@typescript-eslint/explicit-member-accessibility': error
'@typescript-eslint/member-ordering': warn
camelcase: warn
no-console: warn
array-callback-return: error
complexity:
- warn
- max: 15
no-implicit-globals: warn
require-await: warn
no-shadow: warn
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.md
*.js
30 changes: 17 additions & 13 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
"typescript.tsdk": "node_modules/typescript/lib",

"git.alwaysSignOff": true
}
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
"typescript.tsdk": "node_modules/typescript/lib",
// Standardize on the Prettier formatter
"[typescript,json,yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"typescript.format.enable": false,
// Enforce eslint and prettier on save
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.alwaysShowStatus": true,
// In Zowe we need to sign all commits
"git.alwaysSignOff": true
}
Loading