Skip to content

Commit 27326bf

Browse files
authored
Merge pull request #100 from CMSgov/brandon/BB2-4035-upgrade-linter-plugins
adding eslintrc.mjs and upgraded eslint plugins
2 parents d1fdc85 + 2a7a599 commit 27326bf

File tree

5 files changed

+14775
-33
lines changed

5 files changed

+14775
-33
lines changed

client/eslintrc.json

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

client/eslintrc.mjs

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import { defineConfig } from "eslint/config";
2+
import react from "eslint-plugin-react";
3+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
4+
import globals from "globals";
5+
import tsParser from "@typescript-eslint/parser";
6+
import path from "node:path";
7+
import { fileURLToPath } from "node:url";
8+
import js from "@eslint/js";
9+
import { FlatCompat } from "@eslint/eslintrc";
10+
11+
const __filename = fileURLToPath(import.meta.url);
12+
const __dirname = path.dirname(__filename);
13+
const compat = new FlatCompat({
14+
baseDirectory: __dirname,
15+
recommendedConfig: js.configs.recommended,
16+
allConfig: js.configs.all
17+
});
18+
19+
export default defineConfig([{
20+
extends: compat.extends(
21+
"eslint:recommended",
22+
"plugin:react/recommended",
23+
"plugin:@typescript-eslint/recommended",
24+
),
25+
26+
plugins: {
27+
react,
28+
"@typescript-eslint": typescriptEslint,
29+
},
30+
31+
languageOptions: {
32+
globals: {
33+
...globals.browser,
34+
},
35+
36+
parser: tsParser,
37+
ecmaVersion: 12,
38+
sourceType: "script",
39+
40+
parserOptions: {
41+
ecmaFeatures: {
42+
jsx: true,
43+
},
44+
},
45+
},
46+
47+
rules: {
48+
"@typescript-eslint/no-explicit-any": "off",
49+
},
50+
}]);

0 commit comments

Comments
 (0)