Skip to content

Commit

Permalink
update eslint configs to include Fresco eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkarimoff committed Feb 26, 2024
1 parent f86afea commit 560b3cb
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 136 deletions.
18 changes: 18 additions & 0 deletions apps/analytics-web/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
module.exports = {
extends: ["custom/next"],
overrides: [
{
extends: [
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:@typescript-eslint/recommended-type-checked",
],
files: ["*.ts", "*.tsx"],
parserOptions: {
project: ["./tsconfig.json"],
tsconfigRootDir: __dirname,
},
},
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: ["./tsconfig.json"],
tsconfigRootDir: __dirname,
},
};
14 changes: 10 additions & 4 deletions apps/analytics-web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@
"resolveJsonModule": true,
"isolatedModules": true,
"paths": {
"~/*": ["./*"]
}
"~/*": ["./*"],
},
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
".eslintrc.js",
],
"exclude": ["node_modules"],
}
20 changes: 19 additions & 1 deletion apps/documentation/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
module.exports = {
extends: ["custom/next"],
extends: ['custom/next'],
overrides: [
{
extends: [
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:@typescript-eslint/recommended-type-checked',
],
files: ['*.ts', '*.tsx'],
parserOptions: {
project: ['./tsconfig.json'],
tsconfigRootDir: __dirname,
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.json'],
tsconfigRootDir: __dirname,
},
};
142 changes: 71 additions & 71 deletions apps/documentation/public/sitemap-0.xml

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion apps/documentation/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
"~/*": ["./*"],
},
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
".eslintrc.js",
],
"exclude": ["node_modules"],
}
25 changes: 3 additions & 22 deletions packages/eslint-config-custom/next.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,11 @@
import { join } from "path";

/** @type {import("eslint").Linter.Config} */
const config = {
overrides: [
{
extends: [
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:@typescript-eslint/recommended-type-checked",
],
files: ["*.ts", "*.tsx"],
parserOptions: {
project: join(__dirname, "tsconfig.json"),
},
},
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: join(__dirname, "tsconfig.json"),
},
plugins: ["@typescript-eslint", "eslint-plugin-local-rules"],
plugins: ["@typescript-eslint"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/stylistic",
"plugin:@typescript-eslint/recommended",
"next/core-web-vitals",
"plugin:storybook/recommended",
"prettier",
],
ignorePatterns: ["node_modules", "*.stories.*", "*.test.*"],
Expand Down Expand Up @@ -54,7 +35,7 @@ const config = {
},
],
"no-unreachable": "error",
"local-rules/require-data-mapper": "error",
},
};
export default config;

module.exports = config;
44 changes: 7 additions & 37 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 560b3cb

Please sign in to comment.