47 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
| const js = require('@eslint/js');
 | |
| const tsParser = require('@typescript-eslint/parser');
 | |
| const tsPlugin = require('@typescript-eslint/eslint-plugin');
 | |
| const importPlugin = require('eslint-plugin-import');
 | |
| const globals = require('globals');
 | |
| 
 | |
| module.exports = [
 | |
|   {
 | |
|     ignores: ['**/*.json', 'dist'],
 | |
|   },
 | |
|   js.configs.recommended,
 | |
|   {
 | |
|     files: ['**/*.{js,jsx,ts,tsx}'],
 | |
|     languageOptions: {
 | |
|       globals: {
 | |
|         ...globals.node,
 | |
|         ...globals.jest,
 | |
|         vi: true,
 | |
|       },
 | |
|     },
 | |
|     plugins: {
 | |
|       import: importPlugin,
 | |
|     },
 | |
|     rules: {
 | |
|       'import/order': 'error',
 | |
|     },
 | |
|   },
 | |
|   {
 | |
|     files: ['**/*.{ts,tsx}'],
 | |
|     languageOptions: {
 | |
|       parser: tsParser,
 | |
|     },
 | |
|     plugins: {
 | |
|       '@typescript-eslint': tsPlugin,
 | |
|     },
 | |
|     rules: {
 | |
|       ...tsPlugin.configs.recommended.rules,
 | |
|       ...tsPlugin.configs.stylistic.rules,
 | |
|       '@typescript-eslint/no-unnecessary-condition': 'off',
 | |
|       'arrow-body-style': 'off',
 | |
|       '@typescript-eslint/naming-convention': 'warn',
 | |
|       '@typescript-eslint/no-explicit-any': 'off',
 | |
|       '@typescript-eslint/array-type': 'off',
 | |
|     },
 | |
|   },
 | |
| ];
 |