diff --git a/.github/workflows/lint.yaml b/.github/workflows/quality.yaml similarity index 80% rename from .github/workflows/lint.yaml rename to .github/workflows/quality.yaml index f2acf93..9bdafc5 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/quality.yaml @@ -29,8 +29,8 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Run linters - uses: wearerequired/lint-action@v2 - with: - eslint: true - prettier: true + - name: Run Prettier + run: pnpm run prettier:check + + - name: Run ESLint + run: pnpm run eslint diff --git a/eslint.config.js b/eslint.config.js index 9364915..de11cd7 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -9,7 +9,8 @@ export default tseslint.config(eslint.configs.recommended, ...tseslint.configs.r plugins: { 'typescript-eslint': ParserTypeScript, prettier: prettierPlugin - }, ignores: ['build', 'node_modules', 'coverage', 'eslint.config.js'], + }, + ignores: ['build', 'node_modules', 'coverage', 'eslint.config.js'], languageOptions: { globals: { ...globals.node, @@ -20,12 +21,12 @@ export default tseslint.config(eslint.configs.recommended, ...tseslint.configs.r } }, rules: { - ...prettierPlugin.configs.recommended.rules, - ...eslintConfigPrettier.rules, + ...prettierPlugin.configs.recommended.rules, + ...eslintConfigPrettier.rules, '@typescript-eslint/no-var-requires': 0, '@typescript-eslint/no-non-null-assertion': 0, - '@typescript-eslint/no-explicit-any': "warn", + '@typescript-eslint/no-explicit-any': 'warn', 'prettier/prettier': ['error', { endOfLine: 'auto' }], - 'no-constant-binary-expression': "off" + 'no-constant-binary-expression': 'off' } }); diff --git a/package.json b/package.json index 5e7f68b..f7d9edf 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,10 @@ "development": "tsc&& cross-env NODE_ENV=development node build/main.js", "production": "cross-env NODE_ENV=production node build/main.js", "cookies_grabbing": "cross-env NODE_ENV=development node build/Script_getCookie.js", - "test": "tsc&& cross-env NODE_ENV=development node --test" + "test": "tsc&& cross-env NODE_ENV=development node --test", + "eslint": "eslint \"src/**/*.{ts,js}\"", + "prettier:format": "prettier --write \"**/*.{ts,js}\"", + "prettier:check": "prettier --check \"**/*.{ts,js}\"" }, "type": "module", "keywords": [],