diff --git a/examples/eslint-legacy/.eslintrc.js b/examples/eslint-legacy/.eslintrc.js index fd533ec99..2e23414d6 100644 --- a/examples/eslint-legacy/.eslintrc.js +++ b/examples/eslint-legacy/.eslintrc.js @@ -1,15 +1,8 @@ -const { resolve } = require('node:path') - /** @type {import('eslint').Linter.LegacyConfig} */ module.exports = { extends: [ - '@master/css', + 'plugin:@master/css/legacy', ], - settings: { - '@master/css': { - config: resolve(__dirname, 'master.css') - } - }, overrides: [ { files: [ '*.html'], diff --git a/packages/eslint-config/src/flat.ts b/packages/eslint-config/src/flat.ts deleted file mode 100644 index 1750af7b3..000000000 --- a/packages/eslint-config/src/flat.ts +++ /dev/null @@ -1,3 +0,0 @@ -import plugin from '@master/eslint-plugin-css' - -export default plugin.configs.flat \ No newline at end of file diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 4398a5bd3..a5f33cc92 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -37,6 +37,11 @@ "import": "./dist/index.mjs", "require": "./dist/index.cjs", "types": "./dist/index.d.ts" + }, + "./configs/*": { + "import": "./dist/configs/*.mjs", + "require": "./dist/configs/*.cjs", + "types": "./dist/configs/*.d.ts" } }, "files": [ diff --git a/packages/eslint-plugin/src/configs/legacy.ts b/packages/eslint-plugin/src/configs/legacy.ts new file mode 100644 index 000000000..e59305b50 --- /dev/null +++ b/packages/eslint-plugin/src/configs/legacy.ts @@ -0,0 +1,8 @@ +import type { Linter } from 'eslint' +import recommended from './recommended' + +export default { + plugins: ['@master/css'], + rules: recommended.rules, + parserOptions: recommended.languageOptions.parserOptions +} as Linter.LegacyConfig \ No newline at end of file