2024-12-06 00:32:27 -08:00
|
|
|
import eslintPluginJs from '@eslint/js';
|
|
|
|
import eslintPluginStylistic from '@stylistic/eslint-plugin';
|
|
|
|
import globals from 'globals';
|
|
|
|
|
|
|
|
const config = [
|
2024-12-08 16:02:58 -08:00
|
|
|
eslintPluginJs.configs.recommended,
|
|
|
|
eslintPluginStylistic.configs['recommended-flat'],
|
2024-12-06 00:32:27 -08:00
|
|
|
{
|
|
|
|
files: ['**/*.js', '**/*.mjs'],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
languageOptions: {
|
|
|
|
globals: {
|
|
|
|
...globals.browser,
|
|
|
|
...globals.node,
|
|
|
|
Log: 'readonly',
|
|
|
|
MM: 'readonly',
|
|
|
|
Module: 'readonly',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
rules: {
|
2024-12-08 16:02:58 -08:00
|
|
|
'@stylistic/brace-style': ['error', '1tbs', { allowSingleLine: true }],
|
2024-12-06 00:32:27 -08:00
|
|
|
'@stylistic/comma-dangle': ['error', 'only-multiline'],
|
2024-12-08 16:02:58 -08:00
|
|
|
'@stylistic/semi': ['error', 'always'],
|
2024-12-06 00:38:56 -08:00
|
|
|
'object-shorthand': ['error', 'always']
|
2024-12-06 00:32:27 -08:00
|
|
|
},
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
export default config;
|