mirror of
https://github.com/github/codeql-action.git
synced 2025-12-27 09:40:17 +08:00
38 lines
1.2 KiB
JavaScript
38 lines
1.2 KiB
JavaScript
const globals = require('globals')
|
|
const github = require('../../plugin')
|
|
const importPlugin = require('eslint-plugin-import')
|
|
const escompat = require('eslint-plugin-escompat')
|
|
const {fixupPluginRules} = require('@eslint/compat')
|
|
|
|
module.exports = {
|
|
...escompat.configs['flat/recommended'],
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
},
|
|
},
|
|
plugins: {import: importPlugin, escompat, github: fixupPluginRules(github)},
|
|
rules: {
|
|
'escompat/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',
|
|
'import/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()`',
|
|
},
|
|
],
|
|
},
|
|
}
|