mirror of
https://github.com/penpot/penpot.git
synced 2026-02-11 07:03:53 -05:00
67 lines
1.5 KiB
JavaScript
67 lines
1.5 KiB
JavaScript
import js from '@eslint/js';
|
|
import tseslint from 'typescript-eslint';
|
|
import globals from 'globals';
|
|
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
|
|
export default [
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended.map((config) => ({
|
|
...config,
|
|
files: config.files || ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'],
|
|
})),
|
|
eslintConfigPrettier,
|
|
{
|
|
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
penpot: 'readonly',
|
|
repairIntrinsics: 'readonly',
|
|
hardenIntrinsics: 'readonly',
|
|
Compartment: 'readonly',
|
|
harden: 'readonly',
|
|
},
|
|
parserOptions: {
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module',
|
|
},
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{ argsIgnorePattern: '^_' },
|
|
],
|
|
'no-multiple-empty-lines': ['error', { max: 1 }],
|
|
quotes: ['error', 'single', { avoidEscape: true }],
|
|
},
|
|
},
|
|
{
|
|
files: ['**/*.spec.ts', '**/*.test.ts'],
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.jest,
|
|
},
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
},
|
|
},
|
|
{
|
|
files: ['**/*.js', '**/*.jsx'],
|
|
rules: {},
|
|
},
|
|
{
|
|
ignores: [
|
|
'node_modules',
|
|
'dist',
|
|
'**/dist/**',
|
|
'**/.vite/**',
|
|
'eslint.config.js',
|
|
'vite.config.{js,ts,mjs,mts}',
|
|
'**/vite.config.*.timestamp*',
|
|
'**/vitest.config.*.timestamp*',
|
|
],
|
|
},
|
|
];
|