View | Details | Raw Unified | Return to bug 38167
Collapse All | Expand All

(-)a/.eslintrc.json (-30 lines)
Lines 1-30 Link Here
1
{
2
    "env": {
3
        "browser": true,
4
        "jquery": true
5
    },
6
    "extends": [
7
        "eslint:recommended",
8
        "eslint-config-prettier"
9
    ],
10
    "plugins": [
11
        "eslint-plugin-prettier"
12
    ],
13
    "rules": {
14
        "indent": [
15
            "error",
16
            4
17
        ],
18
        "linebreak-style": [
19
            "error",
20
            "unix"
21
        ],
22
        "semi": [
23
            "error",
24
            "always"
25
        ],
26
        "prettier/prettier": [
27
            "error"
28
        ]
29
    }
30
}
(-)a/eslint.config.mjs (-1 / +34 lines)
Line 0 Link Here
0
- 
1
import prettier from "eslint-plugin-prettier";
2
import globals from "globals";
3
import path from "node:path";
4
import { fileURLToPath } from "node:url";
5
import js from "@eslint/js";
6
import { FlatCompat } from "@eslint/eslintrc";
7
8
const __filename = fileURLToPath(import.meta.url);
9
const __dirname = path.dirname(__filename);
10
const compat = new FlatCompat({
11
    baseDirectory: __dirname,
12
    recommendedConfig: js.configs.recommended,
13
    allConfig: js.configs.all
14
});
15
16
export default [...compat.extends("eslint:recommended", "eslint-config-prettier"), {
17
    plugins: {
18
        prettier,
19
    },
20
21
    languageOptions: {
22
        globals: {
23
            ...globals.browser,
24
            ...globals.jquery,
25
        },
26
    },
27
28
    rules: {
29
        indent: ["error", 4],
30
        "linebreak-style": ["error", "unix"],
31
        semi: ["error", "always"],
32
        "prettier/prettier": ["error"],
33
    },
34
}];

Return to bug 38167