diff --git a/plugins/tailwind/.eslintignore b/plugins/tailwind/.eslintignore deleted file mode 100644 index 5f37ca5..0000000 --- a/plugins/tailwind/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -lib -dist diff --git a/plugins/tailwind/.eslintrc.cjs b/plugins/tailwind/.eslintrc.cjs deleted file mode 100644 index f559331..0000000 --- a/plugins/tailwind/.eslintrc.cjs +++ /dev/null @@ -1,33 +0,0 @@ -module.exports = { - env: { - browser: true, - es6: true, - node: true, - }, - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:@typescript-eslint/recommended-requiring-type-checking', - 'plugin:prettier/recommended', - ], - globals: { - Atomics: 'readonly', - SharedArrayBuffer: 'readonly', - }, - parser: '@typescript-eslint/parser', - parserOptions: { - tsconfigRootDir: __dirname, - project: ['tsconfig.json', 'tests/tsconfig.json'], - extraFileExtensions: ['.cjs'], - }, - plugins: ['@typescript-eslint'], - rules: { - 'no-mixed-spaces-and-tabs': ['off'], - 'no-unused-vars': ['off'], - }, - overrides: [ - { - files: ['src/**/*.ts', 'tests/*.ts'], - }, - ], -}; diff --git a/plugins/tailwind/.npmignore b/plugins/tailwind/.npmignore index 8e3d753..aee1d26 100644 --- a/plugins/tailwind/.npmignore +++ b/plugins/tailwind/.npmignore @@ -1,6 +1,6 @@ .DS_Store .eslintignore -.eslintrc.js +eslint.config.* api-extractor*.json tsconfig*.json rollup.config.* diff --git a/plugins/tailwind/eslint.config.mjs b/plugins/tailwind/eslint.config.mjs new file mode 100644 index 0000000..7d83943 --- /dev/null +++ b/plugins/tailwind/eslint.config.mjs @@ -0,0 +1,54 @@ +import typescriptEslint from "@typescript-eslint/eslint-plugin"; +import globals from "globals"; +import tsParser from "@typescript-eslint/parser"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import js from "@eslint/js"; +import { FlatCompat } from "@eslint/eslintrc"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all +}); + +export default [{ + ignores: ["**/lib", "**/dist"], +}, ...compat.extends( + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/recommended-requiring-type-checking", + "plugin:prettier/recommended", +), { + plugins: { + "@typescript-eslint": typescriptEslint, + }, + + languageOptions: { + globals: { + ...globals.browser, + ...globals.node, + Atomics: "readonly", + SharedArrayBuffer: "readonly", + }, + + parser: tsParser, + ecmaVersion: 5, + sourceType: "commonjs", + + parserOptions: { + tsconfigRootDir: "/Users/slava/Documents/dev/iconify/iconify/iconify-dev/plugins/tailwind", + project: ["tsconfig.json", "tests/tsconfig.json"], + extraFileExtensions: [".cjs"], + }, + }, + + rules: { + "no-mixed-spaces-and-tabs": ["off"], + "no-unused-vars": ["off"], + }, +}, { + files: ["src/**/*.ts", "tests/*.ts"], +}]; \ No newline at end of file diff --git a/plugins/tailwind/package.json b/plugins/tailwind/package.json index b558bb5..d8961cf 100644 --- a/plugins/tailwind/package.json +++ b/plugins/tailwind/package.json @@ -28,22 +28,25 @@ "@iconify/types": "workspace:^" }, "devDependencies": { - "@iconify-json/line-md": "^1.1.38", - "@iconify-json/mdi-light": "^1.1.10", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "^9.13.0", + "@iconify-json/line-md": "^1.2.2", + "@iconify-json/mdi-light": "^1.2.1", "@iconify/utils": "workspace:^", - "@microsoft/api-extractor": "^7.47.2", - "@rollup/plugin-node-resolve": "^15.2.3", - "@rollup/plugin-replace": "^5.0.7", - "@types/jest": "^29.5.12", + "@microsoft/api-extractor": "^7.47.11", + "@rollup/plugin-node-resolve": "^15.3.0", + "@rollup/plugin-replace": "^6.0.1", + "@types/jest": "^29.5.14", "@types/jsdom": "^21.1.7", - "@types/node": "^18.19.41", - "@typescript-eslint/eslint-plugin": "^5.62.0", - "eslint": "^8.57.0", + "@types/node": "^22.8.6", + "@typescript-eslint/eslint-plugin": "^8.12.2", + "eslint": "^9.13.0", + "globals": "^15.11.0", "jest": "^29.7.0", - "rimraf": "^4.4.1", - "rollup": "^3.29.4", - "tailwindcss": "^3.4.6", - "ts-jest": "^29.2.3", - "typescript": "^5.5.3" + "rimraf": "^6.0.1", + "rollup": "^4.24.3", + "tailwindcss": "^3.4.14", + "ts-jest": "^29.2.5", + "typescript": "^5.6.3" } }