From 0ac334d698b7b6b0d3026e4b1bb53f48cf0feaf8 Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Sun, 14 Apr 2024 07:56:58 +0700 Subject: [PATCH] enable some `eslint` rules from `eslint-plugin-import-x` --- tests/eslint/eslint.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/eslint/eslint.config.js b/tests/eslint/eslint.config.js index c51269c6d230..dd322cd8cbca 100644 --- a/tests/eslint/eslint.config.js +++ b/tests/eslint/eslint.config.js @@ -425,6 +425,8 @@ const base = { '@stylistic/js/yield-star-spacing': [ERROR, 'both'], // import: + // forbid any invalid exports, i.e. re-export of the same name + 'import/export': ERROR, // ensure all imports appear before other statements 'import/first': ERROR, // enforce a newline after import statements @@ -449,6 +451,8 @@ const base = { 'import/no-unresolved': [ERROR, { commonjs: true }], // forbid useless path segments 'import/no-useless-path-segments': ERROR, + // forbid Webpack loader syntax in imports + 'import/no-webpack-loader-syntax': ERROR, // node: // enforce the style of file extensions in `import` declarations