-
Notifications
You must be signed in to change notification settings - Fork 12
/
.eslintrc.js
36 lines (36 loc) · 1002 Bytes
/
.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
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md#groups-array
const DEFAULT_ORDER = ["builtin", "external", "parent", "sibling", "index"];
module.exports = {
env: {
browser: true,
es2021: true
},
extends: ["eslint:recommended", "plugin:import/recommended", "plugin:import/typescript", "plugin:react/recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:storybook/recommended"],
settings: {
"import/resolver": {
typescript: true,
node: true
}
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 12,
sourceType: "module",
project: "./tsconfig.json"
},
plugins: ["react", "@typescript-eslint"],
rules: {
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"import/order": ["error", {
groups: DEFAULT_ORDER,
alphabetize: {
order: "asc",
caseInsensitive: true
}
}]
}
};