-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eslintrc.js
52 lines (52 loc) · 1.78 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser'
'plugins': ["react", "jsx-a11y", "import", "prettier", "@typescript-eslint"],
extends: [
'react-app', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'airbnb', // Airbnb style guide
"plugin:@typescript-eslint/recommended",
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
"prettier",
"prettier/react",
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
],
rules: {
'import/prefer-default-export': 'off',
"indent": ["error", 2],
"import/no-cycle": 'off',
// prettier
"prettier/prettier": ["error"],
// TypeScript
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/no-object-literal-type-assertion": "off",
"@typescript-eslint/prefer-interface": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/explicit-function-return-type": "off",
// React
"react/jsx-filename-extension": ["error", { extensions: [".tsx", ".jsx", ".js"] }],
"react/prop-types": ["off", {}],
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
],
"lines-between-class-members": ["error", "always", { exceptAfterSingleLine: true }],
"jsx-a11y/label-has-associated-control": 0
},
settings: {
"import/resolver": {
node: {
extensions: [".js", ".ts", ".jsx", ".tsx", ".json"]
}
},
"import/extensions": [".js", ".ts", ".mjs", ".jsx", ".tsx"]
}
};