lint: Move ESLint config to `.eslintrc.cjs`
parent
d2f4931a35
commit
005ca0bb09
|
@ -0,0 +1,138 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
ignorePatterns: [
|
||||
'/static/js/admin/jquery.autosize.js',
|
||||
'/static/js/admin/minify.json.js',
|
||||
'/static/js/vendors/browser.js',
|
||||
'/static/js/vendors/farbtastic.js',
|
||||
'/static/js/vendors/gritter.js',
|
||||
'/static/js/vendors/html10n.js',
|
||||
'/static/js/vendors/jquery.js',
|
||||
'/static/js/vendors/nice-select.js',
|
||||
'/tests/frontend/lib/',
|
||||
],
|
||||
overrides: [
|
||||
{
|
||||
files: [
|
||||
'**/.eslintrc.*',
|
||||
],
|
||||
extends: 'etherpad/node',
|
||||
},
|
||||
{
|
||||
files: [
|
||||
'**/*',
|
||||
],
|
||||
excludedFiles: [
|
||||
'**/.eslintrc.*',
|
||||
'tests/frontend/**/*',
|
||||
],
|
||||
extends: 'etherpad/node',
|
||||
},
|
||||
{
|
||||
files: [
|
||||
'static/**/*',
|
||||
'tests/frontend/helper.js',
|
||||
'tests/frontend/helper/**/*',
|
||||
],
|
||||
excludedFiles: [
|
||||
'**/.eslintrc.*',
|
||||
],
|
||||
extends: 'etherpad/browser',
|
||||
env: {
|
||||
'shared-node-browser': true,
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: [
|
||||
'tests/frontend/helper/**/*',
|
||||
],
|
||||
globals: {
|
||||
helper: 'readonly',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
files: [
|
||||
'tests/**/*',
|
||||
],
|
||||
excludedFiles: [
|
||||
'**/.eslintrc.*',
|
||||
'tests/frontend/cypress/**/*',
|
||||
'tests/frontend/helper.js',
|
||||
'tests/frontend/helper/**/*',
|
||||
'tests/frontend/travis/**/*',
|
||||
'tests/ratelimit/**/*',
|
||||
],
|
||||
extends: 'etherpad/tests',
|
||||
rules: {
|
||||
'mocha/no-exports': 'off',
|
||||
'mocha/no-top-level-hooks': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: [
|
||||
'tests/backend/**/*',
|
||||
],
|
||||
excludedFiles: [
|
||||
'**/.eslintrc.*',
|
||||
],
|
||||
extends: 'etherpad/tests/backend',
|
||||
overrides: [
|
||||
{
|
||||
files: [
|
||||
'tests/backend/**/*',
|
||||
],
|
||||
excludedFiles: [
|
||||
'tests/backend/specs/**/*',
|
||||
],
|
||||
rules: {
|
||||
'mocha/no-exports': 'off',
|
||||
'mocha/no-top-level-hooks': 'off',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
files: [
|
||||
'tests/frontend/**/*',
|
||||
],
|
||||
excludedFiles: [
|
||||
'**/.eslintrc.*',
|
||||
'tests/frontend/cypress/**/*',
|
||||
'tests/frontend/helper.js',
|
||||
'tests/frontend/helper/**/*',
|
||||
'tests/frontend/travis/**/*',
|
||||
],
|
||||
extends: 'etherpad/tests/frontend',
|
||||
overrides: [
|
||||
{
|
||||
files: [
|
||||
'tests/frontend/**/*',
|
||||
],
|
||||
excludedFiles: [
|
||||
'tests/frontend/specs/**/*',
|
||||
],
|
||||
rules: {
|
||||
'mocha/no-exports': 'off',
|
||||
'mocha/no-top-level-hooks': 'off',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
files: [
|
||||
'tests/frontend/cypress/**/*',
|
||||
],
|
||||
extends: 'etherpad/tests/cypress',
|
||||
},
|
||||
{
|
||||
files: [
|
||||
'tests/frontend/travis/**/*',
|
||||
],
|
||||
extends: 'etherpad/node',
|
||||
},
|
||||
],
|
||||
root: true,
|
||||
};
|
136
src/package.json
136
src/package.json
|
@ -98,142 +98,6 @@
|
|||
"split-grid": "^1.0.11",
|
||||
"supertest": "^6.1.6"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"ignorePatterns": [
|
||||
"/static/js/admin/jquery.autosize.js",
|
||||
"/static/js/admin/minify.json.js",
|
||||
"/static/js/vendors/browser.js",
|
||||
"/static/js/vendors/farbtastic.js",
|
||||
"/static/js/vendors/gritter.js",
|
||||
"/static/js/vendors/html10n.js",
|
||||
"/static/js/vendors/jquery.js",
|
||||
"/static/js/vendors/nice-select.js",
|
||||
"/tests/frontend/lib/"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"**/.eslintrc.js"
|
||||
],
|
||||
"extends": "etherpad/node"
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"**/*"
|
||||
],
|
||||
"excludedFiles": [
|
||||
"**/.eslintrc.js",
|
||||
"tests/frontend/**/*"
|
||||
],
|
||||
"extends": "etherpad/node"
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"static/**/*",
|
||||
"tests/frontend/helper.js",
|
||||
"tests/frontend/helper/**/*"
|
||||
],
|
||||
"excludedFiles": [
|
||||
"**/.eslintrc.js"
|
||||
],
|
||||
"extends": "etherpad/browser",
|
||||
"env": {
|
||||
"shared-node-browser": true
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"tests/frontend/helper/**/*"
|
||||
],
|
||||
"globals": {
|
||||
"helper": "readonly"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"tests/**/*"
|
||||
],
|
||||
"excludedFiles": [
|
||||
"**/.eslintrc.js",
|
||||
"tests/frontend/cypress/**/*",
|
||||
"tests/frontend/helper.js",
|
||||
"tests/frontend/helper/**/*",
|
||||
"tests/frontend/travis/**/*",
|
||||
"tests/ratelimit/**/*"
|
||||
],
|
||||
"extends": "etherpad/tests",
|
||||
"rules": {
|
||||
"mocha/no-exports": "off",
|
||||
"mocha/no-top-level-hooks": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"tests/backend/**/*"
|
||||
],
|
||||
"excludedFiles": [
|
||||
"**/.eslintrc.js"
|
||||
],
|
||||
"extends": "etherpad/tests/backend",
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"tests/backend/**/*"
|
||||
],
|
||||
"excludedFiles": [
|
||||
"tests/backend/specs/**/*"
|
||||
],
|
||||
"rules": {
|
||||
"mocha/no-exports": "off",
|
||||
"mocha/no-top-level-hooks": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"tests/frontend/**/*"
|
||||
],
|
||||
"excludedFiles": [
|
||||
"**/.eslintrc.js",
|
||||
"tests/frontend/cypress/**/*",
|
||||
"tests/frontend/helper.js",
|
||||
"tests/frontend/helper/**/*",
|
||||
"tests/frontend/travis/**/*"
|
||||
],
|
||||
"extends": "etherpad/tests/frontend",
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"tests/frontend/**/*"
|
||||
],
|
||||
"excludedFiles": [
|
||||
"tests/frontend/specs/**/*"
|
||||
],
|
||||
"rules": {
|
||||
"mocha/no-exports": "off",
|
||||
"mocha/no-top-level-hooks": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"tests/frontend/cypress/**/*"
|
||||
],
|
||||
"extends": "etherpad/tests/cypress"
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"tests/frontend/travis/**/*"
|
||||
],
|
||||
"extends": "etherpad/node"
|
||||
}
|
||||
],
|
||||
"root": true
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.17.0",
|
||||
"npm": ">=5.5.1"
|
||||
|
|
Loading…
Reference in New Issue