-
Notifications
You must be signed in to change notification settings - Fork 8
/
.eslintrc.js
66 lines (64 loc) · 2 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
60
61
62
63
64
65
66
module.exports = {
env: {
browser: true,
},
extends: ['@fontoxml', '@fontoxml/eslint-config/typeinfo'],
ignorePatterns: [
'.eslintrc.js',
'config.js',
'dev-cms/**',
'packages/*/assets/**',
'platform/**',
],
parserOptions: {
// Required for running TypeScript/type-aware rules.
// See: https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/TYPED_LINTING.md
project: './tsconfig.json',
},
root: true,
rules: {
'react/prop-types': 'off',
// @TODO: Consider re-enabling these rules once typing coverage has
// increased and strict mode can be (partially) enabled.
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
// @TODO: Consider re-enabling this rule once the Firefox issue
// https://bugzilla.mozilla.org/show_bug.cgi?id=1521435 is fixed
'@typescript-eslint/promise-function-async': 'off',
// Custom sorting to group imports starting with 'fontoxml-'.
// See: https://github.com/lydell/eslint-plugin-simple-import-sort/#custom-grouping
'simple-import-sort/imports': [
'error',
{
groups: [
['^\\u0000'],
['^@?\\w'],
['^fontoxml-'],
['^'],
['^\\.'],
],
},
],
},
settings: {
'import/resolver': {
// Resolve imports using the tsconfig.json file.
// See: https://www.npmjs.com/package/eslint-import-resolver-typescript
typescript: {
alwaysTryTypes: true,
},
},
// Explicitly set the React version because this repository has no
// React dependency. Should be in sync with fontoxml-vendors.
// See: https://www.npmjs.com/package/eslint-plugin-react
react: {
version: '16.12.0',
},
},
};