31 lines
745 B
JavaScript
31 lines
745 B
JavaScript
// eslint.config.js
|
|
import js from "@eslint/js";
|
|
import tseslint from "typescript-eslint";
|
|
import reactPlugin from "eslint-plugin-react";
|
|
import importPlugin from "eslint-plugin-import";
|
|
import globals from "globals";
|
|
|
|
export default [
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
{
|
|
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
languageOptions: {
|
|
globals: globals.browser,
|
|
parserOptions: { sourceType: "module" }
|
|
},
|
|
plugins: {
|
|
react: reactPlugin,
|
|
import: importPlugin
|
|
},
|
|
rules: {
|
|
...reactPlugin.configs.recommended.rules,
|
|
"import/no-unused-modules": ["warn", { unusedExports: true }]
|
|
}
|
|
},
|
|
{
|
|
files: ["**/*.cjs"],
|
|
languageOptions: { sourceType: "commonjs" }
|
|
}
|
|
];
|