forked from lightning-js/solid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
46 lines (45 loc) · 1.62 KB
/
.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* eslint-env node */
const config = {
root: true,
env: {
browser: true,
es2021: true,
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
],
parserOptions: {
project: ['./tsconfig.json', './tsconfig.cfg.json'],
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
tsconfigRootDir: __dirname,
},
rules: {
// Allow us to write async functions that don't use await
// Intresting commentary on this: https://github.com/standard/eslint-config-standard-with-typescript/issues/217
'@typescript-eslint/require-await': 'off',
// Temporary relaxed rules while we tighten up our TypeScript code
// TODO: Remove these rules once we eliminate all of the unnecessary `any` types in the code
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
},
// Temporarily we also ignore all JavaScript files since they will be ultimately converted to TS.
// TODO: Remove this once we have converted all of the JavaScript files to TypeScript
ignorePatterns: ['**/*.js'],
};
module.exports = config;