-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc.js
59 lines (58 loc) · 1.93 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
53
54
55
56
57
58
59
/*
* Copyright (C) 2019-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2019-present Sven Greb <[email protected]>
*
* Project: Arctic
* Repository: https://github.com/arcticicestudio/arctic
* License: MIT
*/
/**
* The ESLint configuration.
* @see https://eslint.org/docs/user-guide/configuring
* @see https://github.com/typescript-eslint/typescript-eslint
* @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
* @see https://www.typescriptlang.org/docs/handbook/compiler-options.html
* @see https://github.com/babel/eslint-plugin-babel#rules
*/
module.exports = {
parser: "babel-eslint",
extends: [
"@arcticicestudio/eslint-config",
"@arcticicestudio/eslint-config/react-hooks",
"@arcticicestudio/eslint-config/prettier"
],
plugins: ["babel"],
rules: {
/*
* Enable support for experimental features:
*
* - `babel/camelcase` - doesn't complain about optional chaining (`let foo = bar?.a_b;`).
* - `babel/no-unused-expressions` - doesn't fail when using `do` expressions or optional chaining (`a?.b()`).
*/
camelcase: "off",
"babel/camelcase": "error",
"no-unused-expressions": "off",
"babel/no-unused-expressions": "error"
},
overrides: [
{
files: ["*.ts", "*.tsx"],
extends: ["@arcticicestudio/eslint-config-typescript", "@arcticicestudio/eslint-config-typescript/prettier"],
parserOptions: {
/* Required for rules that need type information. */
project: "./tsconfig.json",
tsconfigRootDir: "."
}
},
{
/*
* Allow to use development dependencies in Gatsby configuration files since these are necessary and will
* be provided by either Gatsby itself or another without being explicitly defined as package dependency.
*/
files: ["**/.gatsby/**/*.js"],
rules: {
"import/no-extraneous-dependencies": "off"
}
}
]
};