mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-04-06 01:25:33 +00:00
a little linting
This commit is contained in:
parent
d69912ca35
commit
5c8ac4df57
@ -81,12 +81,49 @@ export default tseslint.config(
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Node.js CommonJS files (plugins, etc.) - exclude TypeScript rules
|
||||||
|
{
|
||||||
|
files: ['plugins/**/*.js'],
|
||||||
|
languageOptions: {
|
||||||
|
ecmaVersion: 2020,
|
||||||
|
sourceType: 'commonjs',
|
||||||
|
globals: {
|
||||||
|
require: 'readonly',
|
||||||
|
module: 'readonly',
|
||||||
|
exports: 'readonly',
|
||||||
|
process: 'readonly',
|
||||||
|
console: 'readonly',
|
||||||
|
__dirname: 'readonly',
|
||||||
|
__filename: 'readonly',
|
||||||
|
Buffer: 'readonly',
|
||||||
|
global: 'readonly'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
// Disable TypeScript-specific rules for CommonJS files
|
||||||
|
'@typescript-eslint/no-require-imports': 'off',
|
||||||
|
'@typescript-eslint/no-var-requires': 'off',
|
||||||
|
'@typescript-eslint/no-explicit-any': 'off',
|
||||||
|
'@typescript-eslint/no-unused-vars': 'off',
|
||||||
|
|
||||||
|
// Allow CommonJS patterns
|
||||||
|
'no-undef': 'off',
|
||||||
|
'no-console': 'off',
|
||||||
|
|
||||||
|
// Keep basic JS rules
|
||||||
|
'no-unused-vars': 'warn',
|
||||||
|
'prefer-const': 'error',
|
||||||
|
'no-var': 'error'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
ignores: [
|
ignores: [
|
||||||
'node_modules/**',
|
'node_modules/**',
|
||||||
'cypress/downloads/**',
|
'cypress/downloads/**',
|
||||||
'cypress/screenshots/**',
|
'cypress/screenshots/**',
|
||||||
'cypress/videos/**',
|
'cypress/videos/**',
|
||||||
|
'cypress/plugins/**', // Ignore Node.js CommonJS plugin files
|
||||||
'results/**',
|
'results/**',
|
||||||
'dist/**',
|
'dist/**',
|
||||||
'build/**',
|
'build/**',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user