-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.mjs
59 lines (55 loc) · 1.57 KB
/
eslint.config.mjs
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
import globals from "globals";
// // ESLint Configuration
// export default [
// {
// files: ["**/*.{js,mjs,cjs,ts}"],
// languageOptions: {
// parser: tsParser,
// globals: globals.browser,
// },
// plugins: {
// "@typescript-eslint": tsPlugin,
// },
// // Including the recommended configurations directly
// rules: {
// ...pluginJs.configs.recommended.rules, // JavaScript recommended rules
// ...tsPlugin.configs.recommended.rules, // TypeScript recommended rules
// "@typescript-eslint/no-unused-vars": "warn",
// "@typescript-eslint/explicit-function-return-type": "off",
// "no-console": "warn",
// "semi": ["error", "always"],
// "quotes": ["error", "double"],
// "indent": ["error", 2],
// },
// ignores: ["node_modules/"],
// }
// ];
import ESLint from '@eslint/js';
import ESLintConfigPrettier from 'eslint-config-prettier';
import Oxlint from 'eslint-plugin-oxlint';
import TSESLint from 'typescript-eslint';
export default TSESLint.config(
{
// config with just ignores is the replacement for `.eslintignore`
ignores: ["node_modules/"],
},
ESLint.configs.recommended,
...TSESLint.configs.recommended,
Oxlint.configs['flat/recommended'],
ESLintConfigPrettier,
{
files: ['**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}'],
linterOptions: {
reportUnusedDisableDirectives: true,
},
languageOptions: {
globals: {
...globals.node,
...globals.browser,
...globals.es2021,
},
},
plugins: {},
rules: {},
},
)