1
0
mirror of https://github.com/Minionguyjpro/Inno-Setup-Action synced 2026-02-18 01:31:15 +01:00

refactor: update linting configuration and remove eslintConfig from package.json

- Changed lint script to target JavaScript files in the src directory.
- Removed eslintConfig section as it is no longer needed.
This commit is contained in:
Minionguyjpro
2025-06-18 20:23:01 +02:00
parent 92fdc4cf25
commit 1fa3b88982
4 changed files with 518 additions and 717 deletions

View File

@@ -14,5 +14,5 @@ inputs:
required: false required: false
runs: runs:
using: 'node20' using: 'node21'
main: 'dist/index.js' main: 'dist/index.js'

View File

@@ -2,24 +2,16 @@ import { FlatCompat } from "@eslint/eslintrc";
import path from "path"; import path from "path";
import { fileURLToPath } from "url"; import { fileURLToPath } from "url";
import js from "@eslint/js";
import github from "eslint-plugin-github"; import github from "eslint-plugin-github";
import jest from "eslint-plugin-jest"; import jest from "eslint-plugin-jest";
import babelParser from "@babel/eslint-parser"; import babelParser from "@babel/eslint-parser";
import prettier from "eslint-plugin-prettier"; import prettier from "eslint-plugin-prettier";
import importPlugin from "eslint-plugin-import";
const __filename = fileURLToPath(import.meta.url); const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename); const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
resolvePluginsRelativeTo: __dirname,
});
export default [ export default [
// Convert legacy configs
...compat.extends("prettier"),
{ {
files: ["**/*.js", "**/*.mjs", "**/*.cjs"], files: ["**/*.js", "**/*.mjs", "**/*.cjs"],
ignores: [ ignores: [
@@ -48,6 +40,7 @@ export default [
github, github,
jest, jest,
prettier, prettier,
import: importPlugin,
}, },
rules: { rules: {
camelcase: "off", camelcase: "off",
@@ -62,8 +55,4 @@ export default [
semi: "off", semi: "off",
}, },
}, },
js.configs.recommended,
github.configs.recommended,
jest.configs.recommended,
]; ];

1213
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -29,16 +29,13 @@
"bundle": "npm run format:write && npm run package", "bundle": "npm run format:write && npm run package",
"format:write": "prettier --write **/*.js", "format:write": "prettier --write **/*.js",
"format:check": "prettier --check **/*.js", "format:check": "prettier --check **/*.js",
"lint": "npx eslint . -c ./.github/linters/eslint.config.js", "lint": "eslint src/**/*.js",
"package": "ncc build src/index.js --license licenses.txt", "package": "ncc build src/index.js --license licenses.txt",
"package:watch": "npm run package -- --watch", "package:watch": "npm run package -- --watch",
"test": "jest", "test": "jest",
"all": "npm run format:write && npm run lint && npm run package" "all": "npm run format:write && npm run lint && npm run package"
}, },
"license": "MIT", "license": "MIT",
"eslintConfig": {
"extends": "./.github/linters/eslint.config.js"
},
"jest": { "jest": {
"verbose": true, "verbose": true,
"clearMocks": true, "clearMocks": true,