mirror of
https://github.com/Minionguyjpro/Inno-Setup-Action.git
synced 2026-04-13 10:21:23 +02:00
Update eslint.config.js
This commit is contained in:
19
.github/linters/eslint.config.js
vendored
19
.github/linters/eslint.config.js
vendored
@@ -8,21 +8,16 @@ 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";
|
||||||
|
|
||||||
// Make __dirname available
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
const __dirname = path.dirname(__filename);
|
const __dirname = path.dirname(__filename);
|
||||||
|
|
||||||
// Setup FlatCompat to use legacy shareable configs if needed
|
|
||||||
const compat = new FlatCompat({
|
const compat = new FlatCompat({
|
||||||
baseDirectory: __dirname,
|
baseDirectory: __dirname,
|
||||||
});
|
});
|
||||||
|
|
||||||
// ESLint flat config expects an array of config objects
|
|
||||||
export default [
|
export default [
|
||||||
// FlatCompat usage to extend from old-style configs, if needed
|
...compat.extends("prettier"),
|
||||||
...compat.extends("eslint:recommended"),
|
|
||||||
|
|
||||||
// Direct flat config for your JS files
|
|
||||||
{
|
{
|
||||||
files: ["**/*.js", "**/*.mjs", "**/*.cjs"],
|
files: ["**/*.js", "**/*.mjs", "**/*.cjs"],
|
||||||
ignores: [
|
ignores: [
|
||||||
@@ -35,11 +30,17 @@ export default [
|
|||||||
languageOptions: {
|
languageOptions: {
|
||||||
ecmaVersion: 2023,
|
ecmaVersion: 2023,
|
||||||
sourceType: "module",
|
sourceType: "module",
|
||||||
|
parser: babelParser,
|
||||||
|
parserOptions: {
|
||||||
|
requireConfigFile: false,
|
||||||
|
babelOptions: {
|
||||||
|
presets: ["@babel/preset-env"],
|
||||||
|
},
|
||||||
|
},
|
||||||
globals: {
|
globals: {
|
||||||
Atomics: "readonly",
|
Atomics: "readonly",
|
||||||
SharedArrayBuffer: "readonly",
|
SharedArrayBuffer: "readonly",
|
||||||
},
|
},
|
||||||
parser: babelParser,
|
|
||||||
},
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
github,
|
github,
|
||||||
@@ -51,17 +52,15 @@ export default [
|
|||||||
"eslint-comments/no-use": "off",
|
"eslint-comments/no-use": "off",
|
||||||
"eslint-comments/no-unused-disable": "off",
|
"eslint-comments/no-unused-disable": "off",
|
||||||
"i18n-text/no-en": "off",
|
"i18n-text/no-en": "off",
|
||||||
"import/no-commonjs": "error", // Enforce ES modules only
|
"import/no-commonjs": "error",
|
||||||
"import/no-namespace": "off",
|
"import/no-namespace": "off",
|
||||||
"no-console": "off",
|
"no-console": "off",
|
||||||
"no-unused-vars": "off",
|
"no-unused-vars": "off",
|
||||||
"prettier/prettier": "error",
|
"prettier/prettier": "error",
|
||||||
semi: "off",
|
semi: "off",
|
||||||
},
|
},
|
||||||
settings: {},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Recommended configs from plugins/libraries
|
|
||||||
js.configs.recommended,
|
js.configs.recommended,
|
||||||
github.configs.recommended,
|
github.configs.recommended,
|
||||||
jest.configs.recommended,
|
jest.configs.recommended,
|
||||||
|
|||||||
Reference in New Issue
Block a user