[improve] - setting up some rules and integration with typescript
This commit is contained in:
parent
7cf55c1f3b
commit
0738bfb620
24
.eslintrc.js
24
.eslintrc.js
|
@ -9,7 +9,6 @@ module.exports = {
|
||||||
"parser": "@babel/eslint-parser",
|
"parser": "@babel/eslint-parser",
|
||||||
"extends": [
|
"extends": [
|
||||||
"@rocket.chat/eslint-config",
|
"@rocket.chat/eslint-config",
|
||||||
// 'plugin:react/recommended'
|
|
||||||
],
|
],
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"sourceType": "module",
|
"sourceType": "module",
|
||||||
|
@ -50,14 +49,15 @@ module.exports = {
|
||||||
"extensions": [".js", ".jsx", ".ts", ".tsx"]
|
"extensions": [".js", ".jsx", ".ts", ".tsx"]
|
||||||
}],
|
}],
|
||||||
"react/require-default-props": [0],
|
"react/require-default-props": [0],
|
||||||
"react/no-unused-prop-types": [2, {
|
"ordered-imports": [0],
|
||||||
"skipShapeProps": true
|
// "react/no-unused-prop-types": [2, {
|
||||||
}],
|
// "skipShapeProps": true
|
||||||
|
// }],
|
||||||
"react/no-did-mount-set-state": 0,
|
"react/no-did-mount-set-state": 0,
|
||||||
"react/no-multi-comp": [0],
|
"react/no-multi-comp": [0],
|
||||||
"react/jsx-indent": [2, "tab"],
|
"react/jsx-indent": [2, "tab"],
|
||||||
"react/jsx-indent-props": [2, "tab"],
|
"react/jsx-indent-props": [2, "tab"],
|
||||||
"react/forbid-prop-types": 0,
|
// "react/forbid-prop-types": 0,
|
||||||
"jsx-quotes": [2, "prefer-single"],
|
"jsx-quotes": [2, "prefer-single"],
|
||||||
"jsx-a11y/href-no-hash": 0,
|
"jsx-a11y/href-no-hash": 0,
|
||||||
"jsx-a11y/aria-role": 0,
|
"jsx-a11y/aria-role": 0,
|
||||||
|
@ -104,10 +104,7 @@ module.exports = {
|
||||||
"no-undef": 2,
|
"no-undef": 2,
|
||||||
"no-unreachable": 2,
|
"no-unreachable": 2,
|
||||||
"no-unused-expressions": 0,
|
"no-unused-expressions": 0,
|
||||||
"no-unused-vars": [2, {
|
"no-unused-vars": "off",
|
||||||
"vars": "all",
|
|
||||||
"args": "after-used"
|
|
||||||
}],
|
|
||||||
"max-len": 0,
|
"max-len": 0,
|
||||||
"react/jsx-uses-vars": 2,
|
"react/jsx-uses-vars": 2,
|
||||||
"no-void": 2,
|
"no-void": 2,
|
||||||
|
@ -133,7 +130,7 @@ module.exports = {
|
||||||
"block-scoped-var": 2,
|
"block-scoped-var": 2,
|
||||||
"curly": [2, "all"],
|
"curly": [2, "all"],
|
||||||
"eqeqeq": [2, "allow-null"],
|
"eqeqeq": [2, "allow-null"],
|
||||||
"new-cap": [2],
|
"new-cap": "off",
|
||||||
"use-isnan": 2,
|
"use-isnan": 2,
|
||||||
"valid-typeof": 2,
|
"valid-typeof": 2,
|
||||||
"linebreak-style": 0,
|
"linebreak-style": 0,
|
||||||
|
@ -193,7 +190,6 @@ module.exports = {
|
||||||
"**/*.tsx"
|
"**/*.tsx"
|
||||||
],
|
],
|
||||||
"extends": [
|
"extends": [
|
||||||
// 'plugin:react/recommended',
|
|
||||||
"plugin:@typescript-eslint/recommended",
|
"plugin:@typescript-eslint/recommended",
|
||||||
"plugin:@typescript-eslint/eslint-recommended",
|
"plugin:@typescript-eslint/eslint-recommended",
|
||||||
"@rocket.chat/eslint-config"
|
"@rocket.chat/eslint-config"
|
||||||
|
@ -257,7 +253,11 @@ module.exports = {
|
||||||
"@typescript-eslint/no-unused-vars": ["error", {
|
"@typescript-eslint/no-unused-vars": ["error", {
|
||||||
"argsIgnorePattern": "^_",
|
"argsIgnorePattern": "^_",
|
||||||
"ignoreRestSiblings": true
|
"ignoreRestSiblings": true
|
||||||
}]
|
}],
|
||||||
|
"new-cap": "off",
|
||||||
|
},
|
||||||
|
"globals": {
|
||||||
|
"JSX": true,
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"import/resolver": {
|
"import/resolver": {
|
||||||
|
|
|
@ -136,8 +136,8 @@
|
||||||
"@babel/eslint-plugin": "^7.13.0",
|
"@babel/eslint-plugin": "^7.13.0",
|
||||||
"@babel/plugin-proposal-decorators": "^7.8.3",
|
"@babel/plugin-proposal-decorators": "^7.8.3",
|
||||||
"@babel/runtime": "^7.12.5",
|
"@babel/runtime": "^7.12.5",
|
||||||
"@rocket.chat/eslint-config-alt": "^0.27.0",
|
|
||||||
"@bugsnag/source-maps": "^2.2.0",
|
"@bugsnag/source-maps": "^2.2.0",
|
||||||
|
"@rocket.chat/eslint-config": "^0.4.0",
|
||||||
"@storybook/addon-storyshots": "5.3.21",
|
"@storybook/addon-storyshots": "5.3.21",
|
||||||
"@storybook/react-native": "5.3.25",
|
"@storybook/react-native": "5.3.25",
|
||||||
"@types/jest": "^26.0.24",
|
"@types/jest": "^26.0.24",
|
||||||
|
|
Loading…
Reference in New Issue