fix: move UTF-8 charset declaration from the Content-Type header to HTML body
[svrjs.git] / eslint.config.js
blob58dd11f664a1eba5607cf2a04296f0266d66b922
1 const globals = require("globals");
2 const pluginJs = require("@eslint/js");
3 const tseslint = require("typescript-eslint");
4 const eslintPluginPrettierRecommended = require("eslint-plugin-prettier/recommended");
5 const jest = require("eslint-plugin-jest");
7 module.exports = tseslint.config(
8   {
9     files: ["**/*.js"],
10     languageOptions: {
11       sourceType: "commonjs"
12     }
13   },
14   {
15     files: ["tests/*.test.js", "tests/**/*.test.js"],
16     ...jest.configs['flat/recommended'],
17     rules: {
18       ...jest.configs['flat/recommended'].rules,
19       'jest/prefer-expect-assertions': 'off',
20     }
21   },
22   {
23     languageOptions: {
24       globals: {
25         ...globals.node
26       }
27     }
28   },
29   pluginJs.configs.recommended,
30   {
31     files: ["**/*.d.ts"],
32     languageOptions: {
33       sourceType: "commonjs",
34       parser: tseslint.parser
35     },
36     extends: [tseslint.configs.base],
37     rules: {
38       "no-redeclare": "off",
39       "no-unused-vars": "off",
40       "@typescript-eslint/no-unused-vars": ["error"],
41       "@typescript-eslint/no-redeclare": [
42         "error",
43         {
44           ignoreDeclarationMerge: true
45         }
46       ]
47     }
48   },
49   eslintPluginPrettierRecommended