mirror of
https://git.tt-rss.org/fox/tt-rss.git
synced 2025-10-14 12:31:00 +02:00
Handle browser globals in a much better way for ESLint.
This commit is contained in:
parent
54b69728d0
commit
20d2ddabdb
@ -1,3 +1,4 @@
|
||||
import globals from 'globals';
|
||||
import js from '@eslint/js';
|
||||
|
||||
export default [
|
||||
@ -9,30 +10,7 @@ export default [
|
||||
ecmaVersion: 2022,
|
||||
sourceType: 'script',
|
||||
globals: {
|
||||
// Browser
|
||||
window: 'readonly',
|
||||
document: 'readonly',
|
||||
console: 'readonly',
|
||||
alert: 'readonly',
|
||||
confirm: 'readonly',
|
||||
setTimeout: 'readonly',
|
||||
setInterval: 'readonly',
|
||||
clearTimeout: 'readonly',
|
||||
clearInterval: 'readonly',
|
||||
fetch: 'readonly',
|
||||
XMLHttpRequest: 'readonly',
|
||||
FormData: 'readonly',
|
||||
URLSearchParams: 'readonly',
|
||||
localStorage: 'readonly',
|
||||
sessionStorage: 'readonly',
|
||||
location: 'readonly',
|
||||
history: 'readonly',
|
||||
navigator: 'readonly',
|
||||
Event: 'readonly',
|
||||
CustomEvent: 'readonly',
|
||||
Element: 'readonly',
|
||||
IntersectionObserver: 'readonly',
|
||||
MutationObserver: 'readonly',
|
||||
...globals.browser,
|
||||
|
||||
// Dojo
|
||||
dojo: 'readonly',
|
||||
|
20
package-lock.json
generated
20
package-lock.json
generated
@ -9,6 +9,7 @@
|
||||
"version": "1.0.0",
|
||||
"devDependencies": {
|
||||
"eslint": "^9.37.0",
|
||||
"globals": "^16.4.0",
|
||||
"gulp": "^5.0.1",
|
||||
"gulp-less": "^5.0.0",
|
||||
"gulp-touch-fd": "^2.0.0",
|
||||
@ -122,6 +123,19 @@
|
||||
"url": "https://opencollective.com/eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/eslintrc/node_modules/globals": {
|
||||
"version": "14.0.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",
|
||||
"integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/js": {
|
||||
"version": "9.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.37.0.tgz",
|
||||
@ -1360,9 +1374,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/globals": {
|
||||
"version": "14.0.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",
|
||||
"integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",
|
||||
"version": "16.4.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-16.4.0.tgz",
|
||||
"integrity": "sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
|
@ -5,6 +5,7 @@
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"eslint": "^9.37.0",
|
||||
"globals": "^16.4.0",
|
||||
"gulp": "^5.0.1",
|
||||
"gulp-less": "^5.0.0",
|
||||
"gulp-touch-fd": "^2.0.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user