MMM-pages/eslint.config.mjs

31 lines
761 B
JavaScript
Raw Normal View History

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'],
{
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 }],
'@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']
},
}
];
export default config;