-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove tslint and use typescript-eslint (#159)
* chore: remove tslint and use typescript-eslint feat: remove tslint and eslint to lint typescript chore: better eslint setting * chore: integrate prettier into eslint * chore: downgrade lint-staged version * fix: child.type.isNextCol error * chore: better eslint config
- Loading branch information
1 parent
9a0025a
commit 97caa9c
Showing
94 changed files
with
1,285 additions
and
645 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 |
---|---|---|
@@ -1,33 +1,16 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"extends": ["standard", "standard-react"], | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"es6": true, | ||
"jest": true, | ||
"commonjs": true | ||
"node": true | ||
}, | ||
"globals": { | ||
"sleep": true, | ||
"prettyFormat": true | ||
}, | ||
"plugins": ["react", "react-hooks"], | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"ecmaVersion": 10, | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"jsx": true | ||
} | ||
}, | ||
"globals": { | ||
"sleep": true, | ||
"prettyFormat": true | ||
}, | ||
"rules": { | ||
// don't force es6 functions to include space before paren | ||
"space-before-function-paren": 0, | ||
"react/prop-types": 0, | ||
// allow specifying true explicitly for boolean props | ||
"react/jsx-boolean-value": 0, | ||
"react-hooks/rules-of-hooks": "error", | ||
"react/no-did-update-set-state": 0, | ||
"jsx-quotes":"off" | ||
} | ||
} | ||
} |
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,5 @@ | ||
module.exports = { | ||
semi: false, | ||
tabWidth: 2, | ||
singleQuote: 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 |
---|---|---|
|
@@ -14,5 +14,4 @@ before_script: | |
|
||
script: | ||
- npm run lint | ||
- npm run tslint:once | ||
- npm run test |
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,52 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"extends": [ | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier/@typescript-eslint", | ||
], | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"jest": true, | ||
"commonjs": true | ||
}, | ||
"plugins": ["@typescript-eslint", "react", "react-hooks", "prettier"], | ||
"parserOptions": { | ||
"project": "./tsconfig.json", | ||
"sourceType": "module", | ||
"ecmaVersion": 6, | ||
"ecmaFeatures": { | ||
"jsx": true | ||
} | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect", | ||
} | ||
}, | ||
|
||
"rules": { | ||
"prettier/prettier": 2, | ||
|
||
// don't force es6 functions to include space before paren | ||
"space-before-function-paren": 0, | ||
"react/prop-types": 0, | ||
"react/no-find-dom-node": 0, | ||
"react/display-name": 0, | ||
// allow specifying true explicitly for boolean props | ||
"react/jsx-boolean-value": 0, | ||
"react-hooks/rules-of-hooks": 2, | ||
"react/no-did-update-set-state": 0, | ||
// maybe we should no-public | ||
"@typescript-eslint/explicit-member-accessibility": 0, | ||
|
||
"@typescript-eslint/interface-name-prefix": 0, | ||
"@typescript-eslint/no-explicit-any": 0, | ||
"@typescript-eslint/explicit-function-return-type": 0, | ||
"@typescript-eslint/no-parameter-properties": 0, | ||
"@typescript-eslint/array-type": 0, | ||
"@typescript-eslint/no-object-literal-type-assertion": 0, | ||
"no-console": ["error", { "allow": ["warn", "error", "info"] }] | ||
} | ||
} |
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.