@elsikora/eslint-config
Version:
ESLint configuration vision of ElsiKora
69 lines (66 loc) • 3.1 kB
JavaScript
import { fixupPluginRules } from '@eslint/compat';
import 'eslint/use-at-your-own-risk';
import { formatPluginName } from '../utility/format-plugin-name.utility.js';
import { formatRuleName } from '../utility/format-rule-name.utility.js';
import next from '@next/eslint-plugin-next';
import tseslint from 'typescript-eslint';
/**
* Loads the ESLint configuration for Next.js applications
* @returns {Array<Linter.Config>} An array of ESLint configurations for Next.js
*/
function loadConfig() {
return [
{
files: ["**/*.js", "**/*.jsx"],
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: "latest",
},
},
},
{
files: ["**/*.ts", "**/*.tsx"],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
projectService: true,
},
},
},
{
files: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
plugins: {
// eslint-disable-next-line @elsikora/typescript/no-unsafe-argument
[]: fixupPluginRules(next),
},
rules: {
[]: "warn",
[]: "warn",
[]: "error",
[]: "warn",
[]: "error",
[]: "warn",
[]: "warn",
[]: "warn",
[]: "error",
[]: "error",
[]: "warn",
[]: "error",
[]: "warn",
[]: "warn",
[]: "warn",
[]: "error",
[]: "warn",
[]: "warn",
[]: "warn",
[]: "warn",
[]: "warn",
},
},
];
}
export { loadConfig as default };
//# sourceMappingURL=next.js.map