-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
38 lines (37 loc) · 1.04 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
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint, { parser } from "typescript-eslint";
import jestPlugin from "eslint-plugin-jest";
/**
* **recommended rules from `@eslint/js`**
* - usage: `pluginJs.configs.recommended`
* - [link](https://github.com/eslint/eslint/blob/main/packages/js/src/configs/eslint-recommended.js)
*
* **recommended rules from `typescript-eslint`**
* - usage: `...tseslint.configs.recommended`
* - [link](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/recommended.ts)
*
* If you want to ignore some of these,
* ```
* rules: {
* 'some-of-rules': 'off',
* }
* ```
*/
export default [
{
files: ["src/**/*.{js,mjs,cjs,ts}"],
languageOptions: {
globals: { ...globals.browser, ...globals.node },
parser,
},
rules: {
...pluginJs.configs.recommended.rules,
...tseslint.configs.recommended.rules,
},
},
{
files: ["**/*.spec.{js,ts}"],
...jestPlugin.configs["flat/recommended"],
},
];