mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-08-29 09:38:26 +02:00
* 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>
69 lines
2.0 KiB
JavaScript
69 lines
2.0 KiB
JavaScript
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],
|
|
},
|
|
]);
|