-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add and configure ESLint and update configuration for Prettier (#341)
* Turn on ESLint and update Prettier * Update eslint config * Update eslint config * Update dependencies * Update ESLint and Prettier configurations * update package.json * Update prettier command * Update prettier config file * Change CRLF to LF * Update docs * Update docs
- Loading branch information
1 parent
a3d889c
commit 7406d65
Showing
26 changed files
with
2,340 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Ignore list | ||
/* | ||
|
||
# Do not ignore these folders: | ||
!__tests__/ | ||
!src/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
module.exports = { | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:eslint-plugin-jest/recommended', | ||
'eslint-config-prettier' | ||
], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint', 'eslint-plugin-jest'], | ||
rules: { | ||
'@typescript-eslint/no-require-imports': 'error', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/ban-ts-comment': [ | ||
'error', | ||
{ | ||
'ts-ignore': 'allow-with-description' | ||
} | ||
], | ||
'no-console': 'error', | ||
'yoda': 'error', | ||
'prefer-const': [ | ||
'error', | ||
{ | ||
destructuring: 'all' | ||
} | ||
], | ||
'no-control-regex': 'off', | ||
'no-constant-condition': ['error', {checkLoops: false}] | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/*{test,spec}.ts'], | ||
rules: { | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'jest/no-standalone-expect': 'off', | ||
'jest/no-conditional-expect': 'off', | ||
'no-console': 'off', | ||
|
||
} | ||
} | ||
], | ||
env: { | ||
node: true, | ||
es6: true, | ||
'jest/globals': true | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
* text=auto | ||
* text=auto eol=lf | ||
.licenses/** -diff linguist-generated=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
blank_issues_enabled: false | ||
blank_issues_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Ignore list | ||
/* | ||
|
||
# Do not ignore these folders: | ||
!__tests__/ | ||
!.github/ | ||
!src/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
printWidth: 80, | ||
tabWidth: 2, | ||
useTabs: false, | ||
semi: true, | ||
singleQuote: true, | ||
trailingComma: 'none', | ||
bracketSpacing: false, | ||
arrowParens: 'avoid' | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.