-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
42 lines (42 loc) · 1.34 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
module.exports = {
root: true,
env: {
es6: true,
node: true,
},
extends: [
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'prettier',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
jsx: true, // Allows for the parsing of JSX
},
},
settings: {
react: {
// XXX Ideally we'd use `detect` to automatically detect the React
// version to use, but this can only work when `eslint-plugin-react` and
// `react` packages are installed in the same workspace. Obviously
// `react` is installed in pkg/app, but in order to avoid needing a full
// `yarn install` to invoke `eslint` we have `eslint-plugin-react`
// installed in the "root" workspace only, such that `yarn workpaces
// focus @monax/aspen` is sufficient to provide an environment in which
// to invoke `eslint`. This is an important CI optimisation, but means
// that autodetection is not possible, so we must manually keep this
// version aligned with what is installed in pkg/app.
version: '18.2.0',
},
},
plugins: ['@typescript-eslint'],
ignorePatterns: ['**/dist/**/*.ts'],
};