2
0
mirror of https://github.com/iconify/iconify.git synced 2024-11-16 09:37:09 +00:00

chore(tailwind): update dependencies, migrate to new eslint

This commit is contained in:
Vjacheslav Trushkin 2024-11-01 17:18:22 +02:00
parent 0e53e41892
commit e3c9dfd800
5 changed files with 72 additions and 50 deletions

View File

@ -1,2 +0,0 @@
lib
dist

View File

@ -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'],
},
],
};

View File

@ -1,6 +1,6 @@
.DS_Store
.eslintignore
.eslintrc.js
eslint.config.*
api-extractor*.json
tsconfig*.json
rollup.config.*

View File

@ -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"],
}];

View File

@ -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"
}
}