|
| 1 | +import js from "@eslint/js"; |
| 2 | +import globals from "globals"; |
| 3 | +import { defineConfig, globalIgnores } from "eslint/config"; |
| 4 | +import jest from "eslint-plugin-jest"; |
| 5 | +import tseslint from "typescript-eslint"; |
| 6 | +import prettierRecommended from "eslint-plugin-prettier/recommended"; |
| 7 | + |
| 8 | +export default defineConfig( |
| 9 | + globalIgnores([ |
| 10 | + "packages/generator-widget/generators/app/templates/**", |
| 11 | + "packages/pluggable-widgets-tools/dist/**" |
| 12 | + ]), |
| 13 | + { |
| 14 | + files: ["**/*.js", "**/*.mjs"], |
| 15 | + ignores: ["packages/release-tools/utils/changelog-parser/changelog.js"], |
| 16 | + plugins: { js }, |
| 17 | + extends: ["js/recommended"], |
| 18 | + languageOptions: { globals: globals.node }, |
| 19 | + rules: { |
| 20 | + "no-unused-vars": ["error", { argsIgnorePattern: "^_" }] |
| 21 | + } |
| 22 | + }, |
| 23 | + { |
| 24 | + files: ["**/*.ts"], |
| 25 | + plugins: { tseslint }, |
| 26 | + extends: ["tseslint/recommended"], |
| 27 | + languageOptions: { globals: globals.node }, |
| 28 | + rules: { |
| 29 | + "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }] |
| 30 | + } |
| 31 | + }, |
| 32 | + { |
| 33 | + files: ["**/__mocks__/**/*.js", "**/__tests__/**/*.js", "packages/pluggable-widgets-tools/test-config/**"], |
| 34 | + plugins: { jest }, |
| 35 | + languageOptions: { globals: jest.environments.globals.globals } |
| 36 | + }, |
| 37 | + { ...prettierRecommended, rules: { "prettier/prettier": process.env.CI ? "error" : "warn" } } |
| 38 | +); |
0 commit comments