Skip to content

Commit 029aaef

Browse files
authored
Merge pull request #183 from kit-data-manager/dev
Migrated eslint configuration
2 parents a087b70 + c12491d commit 029aaef

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

eslint.config.mjs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
2+
import tsParser from "@typescript-eslint/parser";
3+
import path from "node:path";
4+
import { fileURLToPath } from "node:url";
5+
import js from "@eslint/js";
6+
import { FlatCompat } from "@eslint/eslintrc";
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = path.dirname(__filename);
10+
const compat = new FlatCompat({
11+
baseDirectory: __dirname,
12+
recommendedConfig: js.configs.recommended,
13+
allConfig: js.configs.all
14+
});
15+
16+
export default [{
17+
ignores: ["**/*.config.ts", "react-library/*"],
18+
}, ...compat.extends(
19+
"eslint:recommended",
20+
"plugin:@typescript-eslint/recommended",
21+
"plugin:@stencil-community/recommended",
22+
"prettier",
23+
), {
24+
plugins: {
25+
"@typescript-eslint": typescriptEslint,
26+
},
27+
28+
languageOptions: {
29+
parser: tsParser,
30+
ecmaVersion: 5,
31+
sourceType: "script",
32+
33+
parserOptions: {
34+
project: "./tsconfig.json",
35+
},
36+
},
37+
38+
rules: {
39+
"@stencil-community/strict-boolean-conditions": "off",
40+
"react/jsx-no-bind": "off",
41+
"array-callback-return": "error",
42+
},
43+
}];

0 commit comments

Comments
 (0)