diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..31728f2 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,27 @@ +import tsPlugin from "@typescript-eslint/eslint-plugin" +import tsParser from "@typescript-eslint/parser" + +const config = [ + { + files: ["**/*.ts", "**/*.tsx"], // Target TypeScript files + languageOptions: { + parser: tsParser, + sourceType: "module", + }, + plugins: { + "@typescript-eslint": tsPlugin, + }, + rules: { + ...tsPlugin.configs.recommended.rules, + "semi": ["error", "never"], + "quotes": ["error", "single"], + "@typescript-eslint/no-unused-vars": "warn", + '@typescript-eslint/naming-convention': ['error', { + selector: ['variableLike', 'parameterProperty', 'classProperty', 'typeProperty'], + format: ['PascalCase'] + }] + } + } +] + +export default config \ No newline at end of file diff --git a/package.json b/package.json index 94dfca3..3517c0b 100644 --- a/package.json +++ b/package.json @@ -42,13 +42,10 @@ "parse-domain": "^8.0.2" }, "devDependencies": { - "@stylistic/eslint-plugin": "^2.1.0", - "@typescript-eslint/eslint-plugin": "^7.1.1", - "@typescript-eslint/parser": "^7.1.1", "esbuild": "^0.21.3", - "eslint": "^8.57.0", + "eslint": "^9.9.0", "pnpm": "^9.1.2", - "typescript": "^5.4.5", + "typescript": "^5.5.4", "typescript-eslint": "^7.10.0" } } diff --git a/sources/.eslintrc.cjs b/sources/.eslintrc.cjs deleted file mode 100644 index b566f30..0000000 --- a/sources/.eslintrc.cjs +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - ], - parser: '@typescript-eslint/parser', - parserOptions: { - tsconfigRootDir: __dirname, - project: '../tsconfig.json' - }, - plugins: ['@typescript-eslint', '@stylistic'], - rules: { - '@typescript-eslint/naming-convention': ['error', { - selector: ['variableLike', 'parameterProperty', 'classProperty', 'typeProperty'], - format: ['PascalCase'] - }], - '@typescript-eslint/prefer-nullish-coalescing': 'off', - 'new-cap': 'off', - 'no-var': 'off', - '@stylistic/indent': ['off', 'tab'], - '@stylistic/semi': ['error', 'never'], - '@stylistic/comma-dangle': ['error', 'never'], - '@stylistic/comma-spacing': ['error', { before: false, after: true }], - '@stylistic/quotes': ['error', 'single'], - '@typescript-eslint/no-unused-vars': 'off' - }, - ignorePatterns: ['dist', 'node_modules', '.eslintrc.cjs'] -} diff --git a/sources/src/loaders/ztinywave.ts b/sources/src/loaders/ztinywave.ts index 4ca32ed..62bb5da 100644 --- a/sources/src/loaders/ztinywave.ts +++ b/sources/src/loaders/ztinywave.ts @@ -175,7 +175,7 @@ export const Tinywave = async () => { for (const Entity of PrivateEntities) { if (Entity.Type === EntityTypes.Head) { // eslint-disable-next-line no-await-in-loop - Entity.Html = await ResolveResourceUrls(Entity.Html, Token) + Entity.Html = await ResolveResourceUrls(Entity.Html, Token as string) } } }