diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index d6c64e10..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,120 +0,0 @@ -module.exports = { - env: { - browser: true, - es6: true, - node: true, - "shared-node-browser": true, - }, - extends: [ - "plugin:react/recommended", - "prettier", - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:import/errors", - "plugin:import/warnings", - ], - ignorePatterns: ["*.js"], - parser: "@typescript-eslint/parser", - parserOptions: { - project: "./tsconfig.json", - ecmaVersion: 2019, - sourceType: "module", - jsx: true, - ecmaFeatures: { - experimentalObjectRestSpread: true, - }, - }, - plugins: ["react", "prettier", "@typescript-eslint", "import"], - rules: { - "@typescript-eslint/adjacent-overload-signatures": "error", - "@typescript-eslint/await-thenable": "error", - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/no-empty-interface": "warn", - "@typescript-eslint/no-floating-promises": ["error", { ignoreVoid: true }], - "@typescript-eslint/no-namespace": "error", - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/no-shadow": [ - "warn", - { - hoist: "all", - }, - ], - "@typescript-eslint/no-unnecessary-type-assertion": "error", - "@typescript-eslint/no-use-before-define": [ - "error", - { functions: false, classes: false, variables: true }, - ], - "@typescript-eslint/prefer-for-of": "warn", - "@typescript-eslint/require-await": "error", - "@typescript-eslint/return-await": ["error", "never"], - "@typescript-eslint/semi": "error", - "@typescript-eslint/triple-slash-reference": "error", - "@typescript-eslint/unified-signatures": "warn", - "comma-dangle": ["error", "only-multiline"], - "constructor-super": "error", - eqeqeq: ["warn", "always"], - "import/no-deprecated": "warn", - "import/no-extraneous-dependencies": "error", - "import/no-unassigned-import": ["warn", { allow: ["**/*.scss"] }], - "import/no-unresolved": "off", - "import/prefer-default-export": "error", - "no-await-in-loop": "error", - "no-cond-assign": "error", - "no-console": "warn", - "no-debugger": "warn", - "no-duplicate-case": "error", - "no-duplicate-imports": "error", - "no-empty": [ - "error", - { - allowEmptyCatch: true, - }, - ], - "no-floating-promises": "off", - "no-invalid-this": "off", - "no-new-wrappers": "error", - "no-param-reassign": "warn", - "no-redeclare": "error", - "no-return-await": "off", - "no-sequences": "error", - "no-shadow": "off", - "no-throw-literal": "error", - "no-unsafe-finally": "error", - "no-unused-labels": "error", - "no-var": "warn", - "prefer-const": "warn", - "prefer-destructuring": "warn", - "prefer-template": "warn", - "prettier/prettier": [ - "error", - { - printWidth: 80, - tabWidth: 2, - useTabs: false, - trailingComma: "es5", - jsxBracketSameLine: false, - semi: true, - singeQuote: false, - quoteProps: "as-needed", - jsxSingleQuote: false, - bracketSpacing: true, - arrowParens: "always", - htmlWhitespaceSensitivity: "css", - endOfLine: "lf", - embeddedLanguageFormatting: "auto", - allowEmptyCatch: true, - }, - ], - "react/prop-types": "warn", - }, - settings: { - jsdoc: { - tagNamePreference: { - returns: "return", - }, - }, - react: { - version: "detect", - }, - }, -}; diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c4114617..6c1ec5e7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v1 with: - node-version: 12 + node-version: 24 - name: Install Node.js dependencies run: npm ci diff --git a/.stylelintrc.js b/.stylelintrc.js index 62770878..88b2c8ab 100644 --- a/.stylelintrc.js +++ b/.stylelintrc.js @@ -7,9 +7,11 @@ module.exports = { "at-rule-no-unknown": [ true, { - ignoreAtRules: ["function", "if", "each", "include", "mixin"], + ignoreAtRules: ["function", "if", "each", "include", "mixin", "use"], }, ], "no-invalid-position-at-import-rule": null, + "selector-class-pattern": null, + "selector-id-pattern": null, }, }; diff --git a/Dockerfile b/Dockerfile index e025bba9..520b044f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14-alpine +FROM node:24-alpine ENV WORKDIR=/qboard ENV USER=qboard diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..49a4472e --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,25 @@ +// @ts-check + +import eslint from "@eslint/js"; +import prettierPluginRecommended from "eslint-plugin-prettier/recommended"; +import importPlugin from "eslint-plugin-import"; +import reactPlugin from "eslint-plugin-react"; +import { defineConfig } from "eslint/config"; +import tseslint from "typescript-eslint"; + +export default defineConfig( + eslint.configs.recommended, + { + settings: { + react: { + version: "detect", + }, + }, + }, + reactPlugin.configs.flat.recommended, + reactPlugin.configs.flat["jsx-runtime"], + tseslint.configs.recommended, + importPlugin.flatConfigs.recommended, + importPlugin.flatConfigs.typescript, + prettierPluginRecommended +); diff --git a/src/index.html b/index.html similarity index 92% rename from src/index.html rename to index.html index d537dbf5..93d18e96 100644 --- a/src/index.html +++ b/index.html @@ -21,5 +21,6 @@
+