You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
2.2 KiB
84 lines
2.2 KiB
import js from '@eslint/js';
|
|
import globals from 'globals';
|
|
import tseslint from 'typescript-eslint';
|
|
import vue from 'eslint-plugin-vue';
|
|
import svelte from 'eslint-plugin-svelte';
|
|
import astro from 'eslint-plugin-astro';
|
|
import prettier from 'eslint-config-prettier';
|
|
|
|
export default tseslint.config(
|
|
{
|
|
ignores: [
|
|
'**/node_modules/',
|
|
'**/dist/',
|
|
'**/stats/',
|
|
'**/.astro/',
|
|
'**/.turbo/',
|
|
'**/.angular/',
|
|
'**/.svelte-kit/',
|
|
'.claude/',
|
|
'_site/',
|
|
'public/',
|
|
'packages-zip/',
|
|
// generated by the package build scripts
|
|
'packages/icons*/icons/',
|
|
'packages/icons*/src/icons/',
|
|
'packages/icons*/src/icons-dts/',
|
|
'packages/icons*/src/icons.*',
|
|
'packages/icons*/src/aliases.ts',
|
|
'packages/icons*/src/icons-list.ts',
|
|
'packages/icons*/src/dynamic-imports.ts',
|
|
'packages/icons-webfont/icons-*/',
|
|
],
|
|
},
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
...vue.configs['flat/recommended'],
|
|
...svelte.configs.recommended,
|
|
...astro.configs.recommended,
|
|
{
|
|
// TypeScript inside single-file components
|
|
files: ['**/*.vue', '**/*.svelte'],
|
|
languageOptions: {
|
|
parserOptions: { parser: tseslint.parser },
|
|
},
|
|
},
|
|
{
|
|
languageOptions: {
|
|
globals: { ...globals.node, ...globals.browser },
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
caughtErrors: 'none',
|
|
ignoreRestSiblings: true,
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
// icon nodes are a static list, so the each block does not need a key;
|
|
// configured here because these files are published as they are
|
|
files: ['packages/icons-svelte*/src/Icon.svelte'],
|
|
rules: {
|
|
'svelte/require-each-key': 'off',
|
|
},
|
|
},
|
|
{
|
|
// tests pass deliberately invalid values and loosely typed fixtures
|
|
files: ['**/*.spec.{ts,tsx}', '**/vitest-setup.d.ts'],
|
|
rules: {
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
},
|
|
},
|
|
{
|
|
files: ['**/karma.conf.js'],
|
|
rules: {
|
|
'@typescript-eslint/no-require-imports': 'off',
|
|
},
|
|
},
|
|
prettier,
|
|
);
|
|
|