29 lines
798 B
JavaScript
29 lines
798 B
JavaScript
import prettierConfig from 'eslint-config-prettier/flat'
|
|
|
|
export default [
|
|
{
|
|
files: ['src/**/*.js'],
|
|
languageOptions: {
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'script',
|
|
globals: {
|
|
window: 'readonly',
|
|
document: 'readonly',
|
|
dataLayer: 'writable'
|
|
}
|
|
},
|
|
rules: {
|
|
'no-undef': 'warn',
|
|
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
|
'no-var': 'warn',
|
|
'prefer-arrow-callback': 'warn',
|
|
'prefer-const': 'warn',
|
|
'prefer-destructuring': 'warn',
|
|
'prefer-rest-params': 'warn',
|
|
'prefer-spread': 'warn',
|
|
'prefer-template': 'warn',
|
|
}
|
|
},
|
|
prettierConfig
|
|
]
|