diff --git a/.eslintignore b/.eslintignore index 0c3d71d6..87b3b148 100644 --- a/.eslintignore +++ b/.eslintignore @@ -10,7 +10,6 @@ /explorer-v2/build /explorer-v2/build-system/shim/svelte-eslint-parser.* /explorer-v2/build-system/shim/eslint-scope.* -/explorer-v2/build-system/shim/eslint-plugin-svelte3.* /explorer-v2/build-system/shim/eslint.* /explorer-v2/build-system/shim/svelte/* !/.vscode diff --git a/explorer-v2/.gitignore b/explorer-v2/.gitignore index 3ffdbcb5..72917e99 100644 --- a/explorer-v2/.gitignore +++ b/explorer-v2/.gitignore @@ -5,6 +5,5 @@ node_modules /functions /build-system/shim/svelte-eslint-parser.* /build-system/shim/eslint-scope.* -/build-system/shim/eslint-plugin-svelte3.* /build-system/shim/eslint.* /build-system/shim/svelte/* diff --git a/explorer-v2/.prettierignore b/explorer-v2/.prettierignore index 44a3bdf3..19f6507d 100644 --- a/explorer-v2/.prettierignore +++ b/explorer-v2/.prettierignore @@ -4,5 +4,4 @@ build/** node_modules/** /build-system/shim/svelte-eslint-parser.* /build-system/shim/eslint-scope.* -/build-system/shim/eslint-plugin-svelte3.* /build-system/shim/eslint.* diff --git a/explorer-v2/build-system/pre-build/eslint-plugin-svelte3.js b/explorer-v2/build-system/pre-build/eslint-plugin-svelte3.js deleted file mode 100644 index b1dfc60f..00000000 --- a/explorer-v2/build-system/pre-build/eslint-plugin-svelte3.js +++ /dev/null @@ -1 +0,0 @@ -export { processors } from 'eslint-plugin-svelte3'; diff --git a/explorer-v2/build-system/pre-build/webpack.config.js b/explorer-v2/build-system/pre-build/webpack.config.js index a0fb58a9..ce17ed70 100644 --- a/explorer-v2/build-system/pre-build/webpack.config.js +++ b/explorer-v2/build-system/pre-build/webpack.config.js @@ -85,56 +85,6 @@ export default [ }) ] }, - { - ...base, - entry: { - 'eslint-plugin-svelte3': resolve('./eslint-plugin-svelte3.js') - }, - module: { - rules: [ - { - test: /node_modules\/eslint-plugin-svelte3\/index\.js$/u, - loader: 'string-replace-loader', - options: { - search: 'Object\\.keys\\(__require\\.cache\\)', - replace: (original) => `[] /* ${original} */`, - flags: '' - } - }, - { - test: /node_modules\/eslint-plugin-svelte3\/index\.js$/u, - loader: 'string-replace-loader', - options: { - search: 'require\\(linter_path\\)', - replace: (original) => `require('eslint'); // ${original}`, - flags: '' - } - }, - { - test: /node_modules\/eslint-plugin-svelte3\/index\.js$/u, - loader: 'string-replace-loader', - options: { - search: "throw new Error\\('Could not find ESLint Linter in require cache'\\);", - replace: (original) => ` // ${original}`, - flags: '' - } - } - ] - }, - externals: { - 'svelte/compiler': '$$inject_svelte_compiler$$', - eslint: '$$inject_eslint$$' - }, - plugins: [ - new WrapperPlugin({ - test: /eslint-plugin-svelte3\.js/, - header: ` - import * as $$inject_svelte_compiler$$ from 'svelte/compiler'; - import * as $$inject_eslint$$ from 'eslint'; - ` - }) - ] - }, { ...base, entry: { diff --git a/explorer-v2/package.json b/explorer-v2/package.json index 9ba7d1ff..645e6437 100644 --- a/explorer-v2/package.json +++ b/explorer-v2/package.json @@ -15,7 +15,6 @@ "@fontsource/fira-mono": "^5.0.0", "@typescript-eslint/parser": "^6.0.0", "eslint": "^8.0.0", - "eslint-plugin-svelte3": "^4.0.0", "eslint-scope": "^7.0.0", "esquery": "^1.5.0", "pako": "^2.0.3", diff --git a/explorer-v2/src/lib/ESLintPlayground.svelte b/explorer-v2/src/lib/ESLintPlayground.svelte index b273bad8..fd441e00 100644 --- a/explorer-v2/src/lib/ESLintPlayground.svelte +++ b/explorer-v2/src/lib/ESLintPlayground.svelte @@ -30,9 +30,7 @@ let code = state.code || DEFAULT_CODE; let rules = state.rules || Object.assign({}, DEFAULT_RULES_CONFIG); let messages = []; - let useEslintPluginSvelte3 = Boolean(state.useEslintPluginSvelte3); let time = ''; - let options = {}; $: hasLangTs = /lang\s*=\s*(?:"ts"|ts|'ts'|"typescript"|typescript|'typescript')/u.test(code); let tsParser = undefined; @@ -51,16 +49,6 @@ }); } } - $: { - options = useEslintPluginSvelte3 ? getEslintPluginSvelte3Options() : {}; - } - async function getEslintPluginSvelte3Options() { - const pluginSvelte3 = await import('eslint-plugin-svelte3'); - return { - preprocess: pluginSvelte3.processors.svelte3.preprocess, - postprocess: pluginSvelte3.processors.svelte3.postprocess - }; - } // eslint-disable-next-line no-use-before-define -- false positive $: serializedString = (() => { @@ -68,8 +56,7 @@ const serializeRules = equalsRules(DEFAULT_RULES_CONFIG, rules) ? undefined : rules; return serializeState({ code: serializeCode, - rules: serializeRules, - useEslintPluginSvelte3: useEslintPluginSvelte3 ? true : undefined + rules: serializeRules }); })(); $: { @@ -98,7 +85,6 @@ const state = deserializeState(newSerializedString); code = state.code || DEFAULT_CODE; rules = state.rules || Object.assign({}, DEFAULT_RULES_CONFIG); - useEslintPluginSvelte3 = Boolean(state.useEslintPluginSvelte3); } } @@ -121,14 +107,6 @@