Skip to content

Commit 95b8e42

Browse files
committed
Redo eslint config
WIP: ESLint
1 parent a098c2c commit 95b8e42

File tree

11 files changed

+338
-279
lines changed

11 files changed

+338
-279
lines changed

vscode-wpilib/.eslintrc.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

vscode-wpilib/eslint.config.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

vscode-wpilib/eslint.config.mjs

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import tseslint from 'typescript-eslint';
2+
import js from '@eslint/js';
3+
4+
import { defineConfig, globalIgnores } from 'eslint/config';
5+
export default defineConfig([
6+
globalIgnores([
7+
'media/',
8+
'out/',
9+
'resources/',
10+
'.eslintrc.js',
11+
'webpack.config.js',
12+
'gulpfile.js',
13+
'dist',
14+
]),
15+
{
16+
files: ['**/*.ts'],
17+
},
18+
{
19+
plugins: {
20+
'@typescript-eslint': tseslint.plugin,
21+
js,
22+
},
23+
24+
languageOptions: {
25+
parser: tseslint.parser,
26+
ecmaVersion: 2022,
27+
sourceType: 'module',
28+
},
29+
30+
rules: {
31+
'@typescript-eslint/naming-convention': [
32+
'warn',
33+
{
34+
selector: 'import',
35+
format: ['camelCase', 'PascalCase'],
36+
},
37+
],
38+
39+
'@typescript-eslint/no-explicit-any': 'off',
40+
'@typescript-eslint/no-namespace': 'off',
41+
'@typescript-eslint/no-require-imports': 'off',
42+
'@typescript-eslint/no-unused-vars': 'off',
43+
curly: 'warn',
44+
eqeqeq: 'warn',
45+
'no-throw-literal': 'warn',
46+
'no-case-declarations': 'off',
47+
'no-control-regex': 'off',
48+
'no-undef': 'off', // Enforced by tsc instead
49+
'no-unused-vars': 'off',
50+
semi: 'warn',
51+
},
52+
extends: [tseslint.configs.recommended, 'js/recommended'],
53+
},
54+
]);

0 commit comments

Comments
 (0)