-
Notifications
You must be signed in to change notification settings - Fork 55
/
browser.js
36 lines (35 loc) · 1.14 KB
/
browser.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const globals = require('globals')
const github = require('../../plugin')
const importPlugin = require('eslint-plugin-import')
const escompatPlugin = require('eslint-plugin-escompat')
module.exports = {
...escompatPlugin.configs['flat/recommended'],
languageOptions: {
globals: {
...globals.browser,
},
},
plugins: {importPlugin, escompatPlugin, github},
rules: {
'escompatPlugin/no-dynamic-imports': 'off',
'github/async-currenttarget': 'error',
'github/async-preventdefault': 'error',
'github/get-attribute': 'error',
'github/no-blur': 'error',
'github/no-dataset': 'error',
'github/no-innerText': 'error',
'github/no-inner-html': 'error',
'github/unescaped-html-literal': 'error',
'github/no-useless-passive': 'error',
'github/require-passive-events': 'error',
'github/prefer-observers': 'error',
'importPlugin/no-nodejs-modules': 'error',
'no-restricted-syntax': [
'error',
{
selector: "NewExpression[callee.name='URL'][arguments.length=1]",
message: 'Please pass in `window.location.origin` as the 2nd argument to `new URL()`',
},
],
},
}