Skip to content

Commit

Permalink
fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
uzmoi committed Apr 17, 2023
1 parent 4eb3115 commit bc51400
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// @ts-check

// eslint-disable-next-line import/no-extraneous-dependencies
import eslint from "@eslint/js";
import {
importConfig,
Expand All @@ -10,6 +9,12 @@ import {
typescriptRecommendedRequiringTypeChecking,
} from "@acalyle/eslint-config";

const typescriptProject = [
"tsconfig.*.json",
"apps/*/tsconfig.json",
"packages/*/tsconfig.json",
];

/** @type {import("eslint").Linter.FlatConfig[]} */
// eslint-disable-next-line import/no-default-export
export default [
Expand All @@ -25,23 +30,32 @@ export default [
],
},
eslint.configs.recommended,
typescript,
typescriptRecommended,
typescriptRecommendedRequiringTypeChecking,
...react,
importConfig,
{
linterOptions: {
reportUnusedDisableDirectives: true,
},
languageOptions: {
parserOptions: {
project: [
"tsconfig.*.json",
"apps/*/tsconfig.json",
"packages/*/tsconfig.json",
],
ecmaVersion: "latest",
sourceType: "module",
project: typescriptProject,
},
},
settings: {
"import/parsers": {
// cspell:word espree
espree: [".js", ".cjs", ".mjs", ".jsx"],
},
"import/resolver": {
typescript: {
project: typescriptProject,
},
},
},
},
typescript,
typescriptRecommended,
typescriptRecommendedRequiringTypeChecking,
...react,
importConfig,
];

0 comments on commit bc51400

Please sign in to comment.