Skip to content

Commit

Permalink
refactor: move from eslint-plugin-node to eslint-plugin-n
Browse files Browse the repository at this point in the history
eslint-plugin-node is not maintained anymore mysticatea/eslint-plugin-node#300
  • Loading branch information
pkerschbaum committed Oct 22, 2023
1 parent ce318b8 commit 50a84f0
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 59 deletions.
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"eslint-plugin-code-import-patterns": "^3.0.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-n": "^16.2.0",
"eslint-plugin-only-warn": "^1.1.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable node/no-process-env -- config.ts is the only place where reading from process.env is allowed */
/* eslint-disable n/no-process-env -- config.ts is the only place where reading from process.env is allowed */

let deploymentOrigin;
if (typeof window !== 'undefined') {
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
"prettier": "^2.8.8",
"turbo": "^1.10.16"
},
"dependenciesMeta": {
"@pkerschbaum-homepage/config-eslint": {
"injected": true
}
},
"packageManager": "[email protected]",
"engines": {
"pnpm": "8.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"eslint-plugin-code-import-patterns": "^3.0.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-n": "^16.2.0",
"eslint-plugin-only-warn": "^1.1.0",
"eslint-plugin-regexp": "^2.1.0",
"eslint-plugin-unicorn": "^48.0.1",
Expand Down
38 changes: 19 additions & 19 deletions platform/config-eslint/eslint-ecma.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
*/
'only-warn',
'@typescript-eslint/eslint-plugin',
'node',
'n',
'regexp',
'code-import-patterns',
],
Expand All @@ -26,7 +26,7 @@ module.exports = {
'plugin:regexp/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:node/recommended',
'plugin:n/recommended',
'plugin:unicorn/recommended',
'plugin:eslint-comments/recommended',
'prettier',
Expand Down Expand Up @@ -99,23 +99,23 @@ module.exports = {
],
},
],
'node/handle-callback-err': 'error',
'node/no-callback-literal': 'error',
// disable "node/no-extraneous-import" --> thanks to "isolated mode" of node_modules of pnpm and "public-hoist-pattern" being disabled of this monorepo, there is no possibilty for extraneous imports
'node/no-extraneous-import': 'off',
// disable "node/no-missing-import" --> covered by TypeScript
'node/no-missing-import': 'off',
'node/no-process-env': 'error',
'node/no-sync': 'error',
// disable "node/no-unpublished-import" and "node/no-unpublished-require" --> wrong positive for "@vercel/analytics" for whatever reason
'node/no-unpublished-import': 'off',
'node/no-unpublished-require': 'off',
// disable "node/no-unsupported-features/es-syntax" --> covered by TypeScript
'node/no-unsupported-features/es-syntax': 'off',
// disable "node/no-unsupported-features/es-builtins" --> covered by TypeScript
'node/no-unsupported-features/es-builtins': 'off',
// disable "node/no-unsupported-features/node-builtins" --> covered by TypeScript
'node/no-unsupported-features/node-builtins': 'off',
'n/handle-callback-err': 'error',
'n/no-callback-literal': 'error',
// disable "n/no-extraneous-import" --> thanks to "isolated mode" of node_modules of pnpm and "public-hoist-pattern" being disabled of this monorepo, there is no possibilty for extraneous imports
'n/no-extraneous-import': 'off',
// disable "n/no-missing-import" --> covered by TypeScript
'n/no-missing-import': 'off',
'n/no-process-env': 'error',
'n/no-sync': 'error',
// disable "n/no-unpublished-import" and "n/no-unpublished-require" --> wrong positive for "@vercel/analytics" for whatever reason
'n/no-unpublished-import': 'off',
'n/no-unpublished-require': 'off',
// disable "n/no-unsupported-features/es-syntax" --> covered by TypeScript
'n/no-unsupported-features/es-syntax': 'off',
// disable "n/no-unsupported-features/es-builtins" --> covered by TypeScript
'n/no-unsupported-features/es-builtins': 'off',
// disable "n/no-unsupported-features/node-builtins" --> covered by TypeScript
'n/no-unsupported-features/node-builtins': 'off',
'unicorn/filename-case': 'off',
'unicorn/no-negated-condition': 'off',
'unicorn/no-null': 'off',
Expand Down
79 changes: 42 additions & 37 deletions pnpm-lock.yaml

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

1 comment on commit 50a84f0

@vercel
Copy link

@vercel vercel bot commented on 50a84f0 Oct 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.