mirror of
https://github.com/makeplane/plane.git
synced 2025-12-16 20:07:56 +01:00
* fix: moved typescript parser to the base eslint config * fix: eslint warning * fix: type config setting * fix: convert live eslint to cjs
59 lines
1.3 KiB
JavaScript
59 lines
1.3 KiB
JavaScript
const { resolve } = require("node:path");
|
|
const project = resolve(process.cwd(), "tsconfig.json");
|
|
|
|
module.exports = {
|
|
extends: ["prettier", "plugin:@typescript-eslint/recommended"],
|
|
parser: "@typescript-eslint/parser",
|
|
env: {
|
|
node: true,
|
|
es6: true,
|
|
},
|
|
plugins: ["@typescript-eslint", "import"],
|
|
settings: {
|
|
"import/resolver": {
|
|
typescript: {
|
|
project,
|
|
},
|
|
},
|
|
},
|
|
ignorePatterns: [".*.js", "node_modules/"],
|
|
parserOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
},
|
|
rules: {
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"warn",
|
|
{
|
|
argsIgnorePattern: "^_",
|
|
varsIgnorePattern: "^_",
|
|
caughtErrorsIgnorePattern: "^_",
|
|
},
|
|
],
|
|
"import/order": [
|
|
"warn",
|
|
{
|
|
groups: ["builtin", "external", "internal", "parent", "sibling"],
|
|
pathGroups: [
|
|
{
|
|
pattern: "@plane/**",
|
|
group: "external",
|
|
position: "after",
|
|
},
|
|
{
|
|
pattern: "@/**",
|
|
group: "internal",
|
|
position: "before",
|
|
},
|
|
],
|
|
pathGroupsExcludedImportTypes: ["builtin", "internal", "react"],
|
|
alphabetize: {
|
|
order: "asc",
|
|
caseInsensitive: true,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
};
|