Skip to content

Commit

Permalink
chore: update npm packages; update lint config(use 9.*.*), fix build …
Browse files Browse the repository at this point in the history
…after angular 18 updates
  • Loading branch information
denStrigo committed Aug 6, 2024
1 parent 1cedce5 commit 1827280
Show file tree
Hide file tree
Showing 7 changed files with 2,973 additions and 24,374 deletions.
94 changes: 0 additions & 94 deletions .eslintrc.json

This file was deleted.

100 changes: 100 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
import rxjs from "eslint-plugin-rxjs";
import globals from "globals";
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
});

export default [{
ignores: [
"src/framework/**/*",
"docs/**/*",
"packages-smoke/**/*",
"tools/dev-schematics/*/files",
],
}, ...compat.extends(
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates",
"eslint-config-prettier",
).map(config => ({
...config,
files: ["**/*.ts"],
})), {
files: ["**/*.ts"],

plugins: {
rxjs,
},

languageOptions: {
ecmaVersion: 5,
sourceType: "script",

parserOptions: {
project: ["tsconfig.json", "e2e/tsconfig.json"],
createDefaultProgram: true,
},
},

rules: {
quotes: "off",
"dot-notation": "off",
"no-restricted-globals": ["error", "fit", "fdescribe"],
"@typescript-eslint/dot-notation": "error",
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"no-underscore-dangle": "off",
"@typescript-eslint/consistent-type-definitions": "error",

"rxjs/no-unsafe-takeuntil": ["error", {
allow: [
"count",
"defaultIfEmpty",
"endWith",
"every",
"finalize",
"finally",
"isEmpty",
"last",
"max",
"min",
"publish",
"publishBehavior",
"publishLast",
"publishReplay",
"reduce",
"share",
"shareReplay",
"skipLast",
"takeLast",
"throwIfEmpty",
"toArray",
],
}],
},
}, ...compat.extends("plugin:@angular-eslint/template/recommended", "eslint-config-prettier").map(config => ({
...config,
files: ["**/*.html"],
})), {
files: ["**/*.html"],
rules: {},
}, {
files: ["./*.js"],

languageOptions: {
globals: {
...globals.node,
},

ecmaVersion: 11,
sourceType: "commonjs",
},
}];
Loading

0 comments on commit 1827280

Please sign in to comment.