Skip to content

Commit da32350

Browse files
authored
Merge pull request #1447 from mathjax/tests/linting
Introduce linting and formatting on testsuite
2 parents 8ddda40 + 8ca5247 commit da32350

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+6353
-2627
lines changed

eslint.config.mjs

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,39 @@ import tseslint from "typescript-eslint";
55
// For documentation see
66
// https://typescript-eslint.io/packages/typescript-eslint#config
77

8-
export default tseslint.config({
9-
extends: [
10-
eslint.configs.recommended,
11-
jsdoc.configs['flat/recommended'],
12-
...tseslint.configs.recommended
13-
],
14-
languageOptions: {
15-
parserOptions: {
16-
project: true,
8+
export default tseslint.config(
9+
{
10+
extends: [
11+
eslint.configs.recommended,
12+
jsdoc.configs['flat/recommended'],
13+
...tseslint.configs.recommended
14+
],
15+
languageOptions: {
16+
parserOptions: {
17+
project: true,
18+
}
19+
},
20+
files: ['**/*.ts'],
21+
ignores: ["**/*.d.ts", "**/*.js", "**/cjs/*"],
22+
"rules": {
23+
"@typescript-eslint/prefer-includes": "error",
24+
"@typescript-eslint/no-explicit-any": "off",
25+
"@typescript-eslint/no-unused-vars": ["error",
26+
{ "varsIgnorePattern": "^_", "argsIgnorePattern": "^_",
27+
"caughtErrorsIgnorePattern": "^_" }
28+
],
29+
"@typescript-eslint/no-empty-object-type": ["error", {"allowInterfaces": "with-single-extends"}],
30+
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
31+
"prefer-const": ["error", {"destructuring": "all"}],
32+
"jsdoc/tag-lines": ["warn", "always", {"count": 0, "startLines": 1}],
33+
"jsdoc/reject-any-type": "off",
34+
"jsdoc/reject-function-type": "off"
1735
}
1836
},
19-
files: ['ts/**/*.ts'],
20-
ignores: ["**/*.d.ts", "**/*.js", "**/cjs/*"],
21-
"rules": {
22-
"@typescript-eslint/prefer-includes": "error",
23-
"@typescript-eslint/no-explicit-any": "off",
24-
"@typescript-eslint/no-unused-vars": ["error",
25-
{ "varsIgnorePattern": "^_", "argsIgnorePattern": "^_",
26-
"caughtErrorsIgnorePattern": "^_" }
27-
],
28-
"@typescript-eslint/no-empty-object-type": ["error", {"allowInterfaces": "with-single-extends"}],
29-
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
30-
"prefer-const": ["error", {"destructuring": "all"}],
31-
"jsdoc/tag-lines": ["warn", "always", {"count": 0, "startLines": 1}],
32-
"jsdoc/reject-any-type": "off",
33-
"jsdoc/reject-function-type": "off"
37+
{
38+
files: ['**/*.test.ts'],
39+
rules: {
40+
"jsdoc/require-jsdoc": "off"
41+
}
3442
}
35-
});
36-
43+
);

0 commit comments

Comments
 (0)