Skip to content

Commit

Permalink
Update the NPM dependencies.
Browse files Browse the repository at this point in the history
Replace `eslint-plugin-import` with `eslint-plugin-import-x`.
  • Loading branch information
paveloom committed Sep 22, 2024
1 parent de88db5 commit 445dafb
Show file tree
Hide file tree
Showing 3 changed files with 916 additions and 4,101 deletions.
17 changes: 10 additions & 7 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import eslint from "@eslint/js";
import pluginStylistic from "@stylistic/eslint-plugin";
import pluginImport from "eslint-plugin-import";
import pluginImportX from "eslint-plugin-import-x";
import pluginVue from "eslint-plugin-vue";
import pluginTypeScript from "typescript-eslint";
import parserVue from "vue-eslint-parser";
Expand All @@ -23,6 +23,9 @@ export default [
"max-len": ["error", { code: 120 }],
"sort-imports": ["error", { ignoreDeclarationSort: true }],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-expressions": ["error", {
allowShortCircuit: true,
}],
"@typescript-eslint/restrict-template-expressions": ["error", {
allowBoolean: true,
}],
Expand Down Expand Up @@ -60,12 +63,12 @@ export default [
{
...sources,
plugins: {
import: pluginImport,
"import-x": pluginImportX,
},
rules: {
...pluginImport.configs.recommended.rules,
...pluginImport.configs.typescript.rules,
"import/order": [
...pluginImportX.configs.recommended.rules,
...pluginImportX.configs.typescript.rules,
"import-x/order": [
"error", {
"alphabetize": {
order: "asc",
Expand All @@ -86,10 +89,10 @@ export default [
],
},
],
"import/newline-after-import": "error",
"import-x/newline-after-import": "error",
},
settings: {
"import/resolver": {
"import-x/resolver": {
typescript: true,
node: true,
},
Expand Down
Loading

0 comments on commit 445dafb

Please sign in to comment.