-
Notifications
You must be signed in to change notification settings - Fork 2
Fix dependencies vulnerabilities #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
| import js from '@eslint/js'; | ||
| import globals from 'globals'; | ||
|
|
||
| import tsParser from '@typescript-eslint/parser'; | ||
| import tsPlugin from '@typescript-eslint/eslint-plugin'; | ||
|
|
||
| import htmlParser from '@html-eslint/parser'; | ||
| import htmlPlugin from '@html-eslint/eslint-plugin'; | ||
|
|
||
| import headersPlugin from 'eslint-plugin-headers'; | ||
|
|
||
| export default [ | ||
| // Replaces .eslintignore | ||
| { | ||
| ignores: ['dist/**', 'docs/**', 'eslint.config.js'] | ||
| }, | ||
|
|
||
| // Equivalent of "eslint:recommended" | ||
| js.configs.recommended, | ||
|
|
||
| // Base config for JS/TS files | ||
| { | ||
| files: ['**/*.{js,cjs,mjs,ts,tsx}'], | ||
| languageOptions: { | ||
| parser: tsParser, | ||
| parserOptions: { | ||
| sourceType: 'module', | ||
| ecmaVersion: 11, | ||
| allowImportExportEverywhere: true | ||
| }, | ||
| globals: { | ||
| ...globals.browser, | ||
| ...globals.node, | ||
| ...globals.es6, | ||
| Symbol: 'readonly' | ||
| } | ||
| }, | ||
| plugins: { | ||
| '@typescript-eslint': tsPlugin, | ||
| headers: headersPlugin | ||
| }, | ||
| rules: { | ||
| 'no-warning-comments': ['error', { terms: ['todo'], location: 'start' }], | ||
| 'no-console': 0, | ||
| curly: ['error'], | ||
| 'no-empty': [2, { allowEmptyCatch: true }], | ||
| 'no-unused-vars': 'off', | ||
| 'no-undef': 'off', | ||
| '@typescript-eslint/no-unused-vars': ['error', { args: 'none' }], | ||
| 'no-useless-escape': 0, | ||
| eqeqeq: ['error', 'smart'], | ||
| 'headers/header-format': [ | ||
| 'error', | ||
| { | ||
| source: 'file', | ||
| path: '.eslint-header' | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
|
|
||
| // HTML override | ||
| { | ||
| files: ['**/*.html'], | ||
| languageOptions: { | ||
| parser: htmlParser | ||
| }, | ||
| plugins: { | ||
| '@html-eslint': htmlPlugin, | ||
| headers: headersPlugin | ||
| }, | ||
| rules: { | ||
| 'headers/header-format': 'off', | ||
| '@html-eslint/indent': ['error', 4] | ||
| } | ||
| } | ||
| ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When i did this few months ago for video.js. this was the closest rules to keep everything unchanged https://github.com/JoeTurki/videojs-plugins/blob/refactor/plugins/eslint.config.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When i did this few months ago for video.js. this was the closest rules to keep everything unchanged https://github.com/JoeTurki/videojs-plugins/blob/refactor/plugins/eslint.config.ts
Thanks, what I tried is to keep it simple, only changes I had is :
- add
'no-undef': 'off'because it otherwise now it complains about TS globals - I remove
ban-typeswhich doesn't exist anymore
💼 Other
🛡️ Security