[WEB-4790] fix: moved typescript parser to the base eslint config (#7658)
* fix: moved typescript parser to the base eslint config * fix: eslint warning * fix: type config setting * fix: convert live eslint to cjs
This commit is contained in:
parent
cfe710d492
commit
0e6fbaee3a
41 changed files with 129 additions and 99 deletions
|
|
@ -5,6 +5,7 @@ const project = resolve(process.cwd(), "tsconfig.json");
|
|||
/** @type {import("eslint").Linter.Config} */
|
||||
module.exports = {
|
||||
extends: ["prettier", "plugin:@typescript-eslint/recommended"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
plugins: ["react", "react-hooks", "@typescript-eslint", "import"],
|
||||
globals: {
|
||||
React: true,
|
||||
|
|
@ -43,10 +44,10 @@ module.exports = {
|
|||
"@typescript-eslint/no-unused-vars": [
|
||||
"warn",
|
||||
{
|
||||
"argsIgnorePattern": "^_",
|
||||
"varsIgnorePattern": "^_",
|
||||
"caughtErrorsIgnorePattern": "^_"
|
||||
}
|
||||
argsIgnorePattern: "^_",
|
||||
varsIgnorePattern: "^_",
|
||||
caughtErrorsIgnorePattern: "^_",
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/no-explicit-any": "warn",
|
||||
"@typescript-eslint/no-useless-empty-export": "error",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ const project = resolve(process.cwd(), "tsconfig.json");
|
|||
|
||||
module.exports = {
|
||||
extends: ["next", "prettier", "plugin:@typescript-eslint/recommended"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
plugins: ["react", "@typescript-eslint", "import"],
|
||||
globals: {
|
||||
React: "readonly",
|
||||
JSX: "readonly",
|
||||
|
|
@ -11,7 +13,6 @@ module.exports = {
|
|||
node: true,
|
||||
browser: true,
|
||||
},
|
||||
plugins: ["react", "@typescript-eslint", "import"],
|
||||
settings: {
|
||||
"import/resolver": {
|
||||
typescript: {
|
||||
|
|
@ -42,10 +43,10 @@ module.exports = {
|
|||
"@typescript-eslint/no-unused-vars": [
|
||||
"warn",
|
||||
{
|
||||
"argsIgnorePattern": "^_",
|
||||
"varsIgnorePattern": "^_",
|
||||
"caughtErrorsIgnorePattern": "^_"
|
||||
}
|
||||
argsIgnorePattern: "^_",
|
||||
varsIgnorePattern: "^_",
|
||||
caughtErrorsIgnorePattern: "^_",
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/no-explicit-any": "warn",
|
||||
"@typescript-eslint/no-useless-empty-export": "error",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ const project = resolve(process.cwd(), "tsconfig.json");
|
|||
|
||||
module.exports = {
|
||||
extends: ["prettier", "plugin:@typescript-eslint/recommended"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
env: {
|
||||
node: true,
|
||||
es6: true,
|
||||
|
|
@ -25,10 +26,33 @@ module.exports = {
|
|||
"@typescript-eslint/no-unused-vars": [
|
||||
"warn",
|
||||
{
|
||||
"argsIgnorePattern": "^_",
|
||||
"varsIgnorePattern": "^_",
|
||||
"caughtErrorsIgnorePattern": "^_"
|
||||
}
|
||||
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,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue