-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
all: WIP migrate ESLint legacy configs to flat config
Need keep testing that it's working VSCode ESLint extension should be updated to latest insider version I guess, and the extension seems stop working sometimes... Don't restart ESLint server in VSCode, or it will stop working after that until restart VSCode..?
- Loading branch information
1 parent
8c77a20
commit f25c367
Showing
38 changed files
with
628 additions
and
414 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { eslintConfigs } from "@myboothmanager/dev-shared"; | ||
|
||
export default [ | ||
...eslintConfigs.typescript, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
/* eslint-disable import/exports-last */ | ||
|
||
import { IImageUploadInfo } from "./base"; | ||
|
||
/* === Common === */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { eslintConfigs } from "@myboothmanager/dev-shared"; | ||
|
||
export default [ | ||
...eslintConfigs.vue, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { eslintConfigs } from "./eslint/index.mjs"; | ||
|
||
export default [ | ||
...eslintConfigs.typescript, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** @type {import("eslint").Linter.FlatConfig} */ | ||
export default { | ||
name: "@myboothmanager/dev-shared eslint - additional rules", | ||
rules: { | ||
"eqeqeq": ["error", "always", { null: "ignore" }], | ||
"quote-props": ["error", "consistent-as-needed"], | ||
"arrow-body-style": ["error", "as-needed"], | ||
"semi-spacing": ["error", { | ||
before: false, | ||
after: true, | ||
}], | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import importPlugin from "eslint-plugin-import"; | ||
import { fixupPluginRules } from "@eslint/compat"; | ||
import { parser as tsParser } from "typescript-eslint"; | ||
|
||
/** @type {import("eslint").Linter.FlatConfig} */ | ||
export default { | ||
files: ["**/*.(m|c)?(t|j)s", "**/*.vue"], | ||
plugins: { | ||
import: fixupPluginRules(importPlugin), | ||
}, | ||
settings: { | ||
...importPlugin.configs.typescript.settings, | ||
"import/resolver": { | ||
typescript: true, | ||
node: true, | ||
}, | ||
}, | ||
languageOptions: { | ||
parserOptions: { | ||
parser: tsParser, | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
}, | ||
}, | ||
rules: { | ||
// Import plugin rules | ||
...importPlugin.configs.recommended.rules, | ||
...importPlugin.configs.typescript.rules, | ||
"import/namespace": "off", | ||
"import/order": [ "error", { | ||
groups: ["type", "builtin", "external", "internal", "parent", "sibling", "index", "object"], | ||
}], | ||
"import/first": "error", | ||
"import/newline-after-import": "error", | ||
"import/exports-last": "error", | ||
}, | ||
}; |
Oops, something went wrong.