-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
30 lines (30 loc) · 878 Bytes
/
.eslintrc.cjs
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
/** @type {import('eslint').Linter.Config} */
module.exports = {
env: { node: true },
extends: ['rational', 'rational/warn', 'rational/prettier'],
ignorePatterns: ['node_modules', 'lib', 'out', 'dist', '*.config.js', '*.config.cjs', '*rc.js', '*rc.cjs'],
overrides: [
{
files: ['*.cjs'],
parserOptions: { sourceType: 'script' },
},
{
files: ['*.mjs'],
parserOptions: { sourceType: 'module' },
},
{
files: ['*.js'],
parserOptions: { sourceType: require('./package.json').type === 'module' ? 'module' : 'script' },
},
{
extends: ['rational/react', 'rational/prettier'],
files: ['*.jsx', '*.tsx'],
},
{
extends: ['rational/typescript', 'rational/prettier'],
files: ['*.ts', '*.tsx'],
parserOptions: { project: `${__dirname}/tsconfig.json` },
},
],
root: true,
};