mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-08-29 11:38:25 +02:00
chore(dev): upgrade ESLint to latest compatible stack (v10) (#4378)
* chore: upgrade eslint to v9 latest with compatible lint deps Agent-Logs-Url: https://github.com/lucide-icons/lucide/sessions/f7c1f1b5-d213-4afa-91a8-b799a16397ec * Fix eslint config * Fix a lot of eslint errors * Fix eslint * Fix eslint errors * Fix eslint errors * Fix types * Fix eslint warning * Format code * Add eslint 10 * Remove unused vars * Update pnpm * Update deps --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
1
packages/angular/.angular/cache/21.2.19/ng-packagr/tsbuildinfo/lucide-angular.tsbuildinfo
vendored
Normal file
1
packages/angular/.angular/cache/21.2.19/ng-packagr/tsbuildinfo/lucide-angular.tsbuildinfo
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -1,38 +0,0 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts'],
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:@angular-eslint/recommended',
|
||||
'plugin:@angular-eslint/template/process-inline-templates',
|
||||
'prettier',
|
||||
],
|
||||
rules: {
|
||||
'@angular-eslint/directive-selector': [
|
||||
'error',
|
||||
{
|
||||
type: 'attribute',
|
||||
prefix: 'lucide',
|
||||
style: 'camelCase',
|
||||
},
|
||||
],
|
||||
'@angular-eslint/component-selector': [
|
||||
'error',
|
||||
{
|
||||
type: 'attribute',
|
||||
prefix: ['lucide'],
|
||||
style: 'camelCase',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['*.html'],
|
||||
extends: ['plugin:@angular-eslint/template/recommended'],
|
||||
rules: {},
|
||||
},
|
||||
],
|
||||
};
|
||||
68
packages/angular/eslint.config.mjs
Normal file
68
packages/angular/eslint.config.mjs
Normal file
@@ -0,0 +1,68 @@
|
||||
import tseslint from 'typescript-eslint';
|
||||
import angular from 'angular-eslint';
|
||||
import prettier from 'eslint-config-prettier';
|
||||
import { defineConfig } from 'eslint/config';
|
||||
|
||||
export default defineConfig([
|
||||
{
|
||||
// ESLint resolves a config per linted file by walking up from that file, so this config — not
|
||||
// the workspace root one — owns everything under `packages/angular`. That means the root's
|
||||
// `.gitignore`-derived ignores do not apply here and generated output must be listed by hand.
|
||||
ignores: [
|
||||
'dist',
|
||||
'build',
|
||||
'coverage',
|
||||
'out-tsc',
|
||||
'.angular',
|
||||
'src/icons', // Generated by `pnpm build:icons`.
|
||||
'eslint.config.mjs',
|
||||
],
|
||||
},
|
||||
{
|
||||
files: ['**/*.ts'],
|
||||
extends: [tseslint.configs.recommended, angular.configs.tsRecommended],
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
// `tsconfig.json` here is solution-style (`files: []` plus `references`), so `project: true`
|
||||
// resolves to a project that contains no source file. The project service follows the
|
||||
// references the way `tsc` and the editor do.
|
||||
projectService: true,
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
...prettier.rules,
|
||||
'@angular-eslint/directive-selector': [
|
||||
'error',
|
||||
{
|
||||
type: 'attribute',
|
||||
prefix: 'lucide',
|
||||
style: 'camelCase',
|
||||
},
|
||||
],
|
||||
'@angular-eslint/component-selector': [
|
||||
'error',
|
||||
{
|
||||
type: 'attribute',
|
||||
prefix: ['lucide'],
|
||||
style: 'camelCase',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
// Build scripts belong to no tsconfig, so they get the untyped ruleset.
|
||||
files: ['**/*.mts', '**/*.cts'],
|
||||
extends: [tseslint.configs.recommended],
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
rules: prettier.rules,
|
||||
},
|
||||
{
|
||||
files: ['**/*.html'],
|
||||
extends: [angular.configs.templateRecommended],
|
||||
},
|
||||
]);
|
||||
@@ -25,7 +25,7 @@
|
||||
"build:ng": "ng build --configuration production",
|
||||
"test": "pnpm build:icons && ng test --no-watch",
|
||||
"test:watch": "ng test",
|
||||
"lint": "npx eslint 'src/**/*.{js,jsx,ts,tsx,html,css,scss}' --quiet --fix",
|
||||
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx,html,css,scss}' --quiet --fix",
|
||||
"e2e": "ng e2e"
|
||||
},
|
||||
"prettier": {
|
||||
@@ -41,11 +41,8 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-eslint/builder": "~21.1.0",
|
||||
"@angular-eslint/eslint-plugin": "~21.1.0",
|
||||
"@angular-eslint/eslint-plugin-template": "~21.1.0",
|
||||
"@angular-eslint/schematics": "~21.1.0",
|
||||
"@angular-eslint/template-parser": "~21.1.0",
|
||||
"@angular-eslint/builder": "~21.4.0",
|
||||
"@angular-eslint/schematics": "~21.4.0",
|
||||
"@angular/build": "^21.2.19",
|
||||
"@angular/cli": "^21.2.19",
|
||||
"@angular/common": "^21.2.19",
|
||||
|
||||
@@ -8,7 +8,6 @@ import { lucideIconTemplate } from './lucide-icon-template';
|
||||
* @internal
|
||||
*/
|
||||
@Component({
|
||||
// eslint-disable-next-line @angular-eslint/component-selector
|
||||
selector: 'svg[lucideIcon]',
|
||||
template: lucideIconTemplate,
|
||||
host: {
|
||||
|
||||
Reference in New Issue
Block a user