mirror of
https://github.com/luxdao/api.git
synced 2026-10-30 19:53:52 +00:00
26 lines
831 B
JavaScript
26 lines
831 B
JavaScript
import { defineConfig, globalIgnores } from 'eslint/config';
|
|
import globals from 'globals';
|
|
import js from '@eslint/js';
|
|
import tseslint from 'typescript-eslint';
|
|
import stylistic from '@stylistic/eslint-plugin';
|
|
|
|
export default defineConfig([
|
|
globalIgnores(['node_modules', '**/scripts/**']),
|
|
{ files: ['**/*.{js,mjs,cjs,ts}'] },
|
|
{ files: ['**/*.{js,mjs,cjs,ts}'], languageOptions: { globals: globals.browser } },
|
|
{ files: ['**/*.{js,mjs,cjs,ts}'], plugins: { js }, extends: ['js/recommended'] },
|
|
tseslint.configs.recommended,
|
|
{
|
|
plugins: {
|
|
'@stylistic': stylistic,
|
|
},
|
|
rules: {
|
|
'no-trailing-spaces': 'warn',
|
|
'no-unused-vars': 'off',
|
|
'@typescript-eslint/no-unused-vars': 'warn',
|
|
'@stylistic/indent': ['error', 2],
|
|
'@stylistic/quotes': ['error', 'single'],
|
|
},
|
|
},
|
|
]);
|