Skip to content

Commit

Permalink
chore: migrate eslint configs to v9
Browse files Browse the repository at this point in the history
  • Loading branch information
dr460nf1r3 committed Oct 19, 2024
1 parent d66a25e commit ca27e59
Show file tree
Hide file tree
Showing 13 changed files with 1,097 additions and 1,088 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

42 changes: 0 additions & 42 deletions .eslintrc.json

This file was deleted.

18 changes: 0 additions & 18 deletions backend-e2e/.eslintrc.json

This file was deleted.

32 changes: 32 additions & 0 deletions backend-e2e/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import defaultExport from "../eslint.config.mjs";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
{
ignores: ["!**/*"],
},
...defaultExport,
{
files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
rules: {},
},
{
files: ["**/*.ts", "**/*.tsx"],
rules: {},
},
{
files: ["**/*.js", "**/*.jsx"],
rules: {},
},
];
18 changes: 0 additions & 18 deletions backend/.eslintrc.json

This file was deleted.

32 changes: 32 additions & 0 deletions backend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import defaultExport from "../eslint.config.mjs";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
{
ignores: ["!**/*"],
},
...defaultExport,
{
files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
rules: {},
},
{
files: ["**/*.ts", "**/*.tsx"],
rules: {},
},
{
files: ["**/*.js", "**/*.jsx"],
rules: {},
},
];
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"indentStyle": "space",
"indentWidth": 4,
"lineEnding": "lf",
"lineWidth": 80,
"lineWidth": 120,
"attributePosition": "auto",
"ignore": [
"./dist",
Expand Down
36 changes: 0 additions & 36 deletions frontend/.eslintrc.json

This file was deleted.

45 changes: 45 additions & 0 deletions frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
import defaultExport from "../eslint.config.mjs";

export default [{
ignores: ["!**/*"],
}, ...defaultExport, ...compat.extends(
"plugin:@nx/angular",
"plugin:@angular-eslint/template/process-inline-templates",
).map(config => ({
...config,
files: ["**/*.ts"],
})), {
files: ["**/*.ts"],

rules: {
"@angular-eslint/directive-selector": ["error", {
type: "attribute",
prefix: "app",
style: "camelCase",
}],

"@angular-eslint/component-selector": ["error", {
type: "element",
prefix: "app",
style: "kebab-case",
}],
},
}, ...compat.extends("plugin:@nx/angular-template").map(config => ({
...config,
files: ["**/*.html"],
})), {
files: ["**/*.html"],
rules: {},
}];
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
"@catppuccin/highlightjs": "1.0.0",
"@catppuccin/palette": "^1.4.0",
"@catppuccin/tailwindcss": "^0.1.6",
"@nestjs/schematics": "^10.1.4",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.13.0",
"@nestjs/schematics": "^10.2.2",
"@nestjs/testing": "^10.4.5",
"@nx/angular": "20.0.2",
"@nx/esbuild": "20.0.2",
Expand Down Expand Up @@ -84,8 +86,6 @@
"@angular/platform-browser-dynamic": "18.2.8",
"@angular/router": "18.2.8",
"@biomejs/biome": "^1.9.4",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.12.0",
"@fontsource/fira-sans": "^5.1.0",
"@fontsource/jetbrains-mono": "^5.1.1",
"@nestjs/cache-manager": "^2.2.2",
Expand Down
Loading

0 comments on commit ca27e59

Please sign in to comment.