mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-13 13:14:53 +00:00
chore: migrate eslint to flat config
eslint 9 ignores .eslintrc.* by default, so replace .eslintrc.cjs with a flat eslint.config.mjs (in the style of graycoreio/daffodil)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { defineConfig, globalIgnores } from "eslint/config";
|
||||
import eslint from "@eslint/js";
|
||||
import tseslint from "typescript-eslint";
|
||||
|
||||
export default defineConfig([
|
||||
globalIgnores([
|
||||
"**/dist",
|
||||
"**/node_modules",
|
||||
"**/vendor",
|
||||
"_test",
|
||||
]),
|
||||
{
|
||||
files: ["**/*.ts"],
|
||||
extends: [
|
||||
eslint.configs.recommended,
|
||||
tseslint.configs.recommended,
|
||||
],
|
||||
rules: {
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
argsIgnorePattern: "^_",
|
||||
varsIgnorePattern: "^_",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
]);
|
||||
Reference in New Issue
Block a user