Skip to content

Commit

Permalink
Ditch root
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronMoat committed Aug 27, 2024
1 parent 002ad3b commit 61bd332
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 50 deletions.
2 changes: 2 additions & 0 deletions .changeset/orange-hats-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
Replace `eslint-plugin-import` with `eslint-plugin-import-x`

To migrate, any references to `eslint-plugin-import` should be replaced with `eslint-plugin-import-x`, and `import/` rules with `import-x/`.

In addition, it's possible that this may introduce slight behaviour changes.
5 changes: 1 addition & 4 deletions base.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const root = require('find-root')(process.cwd());
const importX = require('eslint-plugin-import-x');
const globals = require('globals');
const babelParser = require('@babel/eslint-parser');
Expand Down Expand Up @@ -97,9 +96,7 @@ const allExtensions = [...jsExtensions, ...tsExtensions];
const settings = {
'import-x/resolver': {
typescript: true,
node: {
moduleDirectory: [root, 'node_modules'],
},
node: true,
},
};

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-cypress": "^3.4.0",
"eslint-plugin-import-x": "^3.1.0",
"eslint-plugin-jest": "^28.7.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"find-root": "^1.1.0",
"globals": "^15.9.0"
},
"devDependencies": {
Expand Down
114 changes: 70 additions & 44 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 61bd332

Please sign in to comment.