mirror of
https://github.com/edward-shen/MMM-pages.git
synced 2024-12-22 08:45:09 -08:00
30 lines
761 B
JavaScript
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;
|