MMM-pages/eslint.config.mjs
2024-12-09 01:02:58 +01:00

30 lines
761 B
JavaScript

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