48 lines
1.1 KiB
JavaScript
48 lines
1.1 KiB
JavaScript
import tsParser from "@typescript-eslint/parser";
|
|
import typescriptplugin from "@typescript-eslint/eslint-plugin";
|
|
import prettierplugin from "eslint-plugin-prettier";
|
|
import eslintjs from "@eslint/js";
|
|
import eslintts from "typescript-eslint";
|
|
import eslintConfigPrettier from "eslint-config-prettier";
|
|
|
|
export default [
|
|
eslintjs.configs.recommended,
|
|
...eslintts.configs.recommended,
|
|
eslintConfigPrettier,
|
|
{
|
|
files: ["**/*.{js,mjs,cjs,ts,cts,mts}"],
|
|
ignores: ["**/node_modules/**", "**/lib/**"],
|
|
plugins: {
|
|
"@typescript-eslint": typescriptplugin,
|
|
prettier: prettierplugin,
|
|
},
|
|
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
ecmaVersion: 6,
|
|
sourceType: "module",
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
},
|
|
|
|
rules: {
|
|
"@typescript-eslint/no-unused-vars": "error",
|
|
"no-delete-var": "warn",
|
|
"no-eval": "error",
|
|
"no-inner-declarations": "warn",
|
|
"no-octal": "warn",
|
|
"no-unused-vars": "off",
|
|
|
|
"prettier/prettier": [
|
|
"error",
|
|
{
|
|
endOfLine: "auto",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
];
|