[misc] setup eslint and prettier and fix any errors

This commit is contained in:
Jakob Ackermann 2021-07-07 12:39:10 +01:00
parent 04219b166f
commit 8858f05eaa
No known key found for this signature in database
GPG key ID: 30C56800FCA3828A
5 changed files with 1851 additions and 59 deletions

17
.eslintrc Normal file
View file

@ -0,0 +1,17 @@
{
"extends": [
"eslint:recommended",
"standard",
"prettier"
],
"parserOptions": {
"ecmaVersion": 2018
},
"env": {
"node": true
},
"rules": {
// Do not allow importing of implicit dependencies.
"import/no-extraneous-dependencies": "error"
}
}

8
.prettierrc Normal file
View file

@ -0,0 +1,8 @@
{
"arrowParens": "avoid",
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 2,
"useTabs": false
}

1764
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -2,6 +2,12 @@
"name": "sharelatex", "name": "sharelatex",
"version": "0.0.1", "version": "0.0.1",
"description": "An online collaborative LaTeX editor", "description": "An online collaborative LaTeX editor",
"scripts": {
"lint": "eslint --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix .",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'"
},
"dependencies": { "dependencies": {
"async": "^0.9.0", "async": "^0.9.0",
"bson": "^1.0.4", "bson": "^1.0.4",
@ -21,11 +27,22 @@
"devDependencies": { "devDependencies": {
"grunt": "~0.4.2", "grunt": "~0.4.2",
"bunyan": "~0.22.1", "bunyan": "~0.22.1",
"eslint": "^7.21.0",
"eslint-config-prettier": "^8.1.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-chai-expect": "^2.2.0",
"eslint-plugin-chai-friendly": "^0.6.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-mocha": "^8.0.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^5.0.0",
"grunt-bunyan": "~0.5.0", "grunt-bunyan": "~0.5.0",
"grunt-execute": "~0.1.5", "grunt-execute": "~0.1.5",
"grunt-available-tasks": "~0.4.1", "grunt-available-tasks": "~0.4.1",
"grunt-concurrent": "~0.4.3", "grunt-concurrent": "~0.4.3",
"grunt-contrib-coffee": "~0.10.1", "grunt-contrib-coffee": "~0.10.1",
"prettier": "^2.2.1",
"semver": "~2.2.1", "semver": "~2.2.1",
"knox": "~0.8.9" "knox": "~0.8.9"
} }

View file

@ -1,47 +1,57 @@
module.exports = module.exports = [
{
[{ name: 'web',
name: "web", repo: 'https://github.com/sharelatex/web-sharelatex.git',
repo: "https://github.com/sharelatex/web-sharelatex.git", version: 'master',
version: "master" },
}, { {
name: "real-time", name: 'real-time',
repo: "https://github.com/sharelatex/real-time-sharelatex.git", repo: 'https://github.com/sharelatex/real-time-sharelatex.git',
version: "master" version: 'master',
}, { },
name: "document-updater", {
repo: "https://github.com/sharelatex/document-updater-sharelatex.git", name: 'document-updater',
version: "master" repo: 'https://github.com/sharelatex/document-updater-sharelatex.git',
}, { version: 'master',
name: "clsi", },
repo: "https://github.com/sharelatex/clsi-sharelatex.git", {
version: "master" name: 'clsi',
}, { repo: 'https://github.com/sharelatex/clsi-sharelatex.git',
name: "filestore", version: 'master',
repo: "https://github.com/sharelatex/filestore-sharelatex.git", },
version: "master" {
}, { name: 'filestore',
name: "track-changes", repo: 'https://github.com/sharelatex/filestore-sharelatex.git',
repo: "https://github.com/sharelatex/track-changes-sharelatex.git", version: 'master',
version: "master" },
}, { {
name: "docstore", name: 'track-changes',
repo: "https://github.com/sharelatex/docstore-sharelatex.git", repo: 'https://github.com/sharelatex/track-changes-sharelatex.git',
version: "master" version: 'master',
}, { },
name: "chat", {
repo: "https://github.com/sharelatex/chat-sharelatex.git", name: 'docstore',
version: "master" repo: 'https://github.com/sharelatex/docstore-sharelatex.git',
}, { version: 'master',
name: "spelling", },
repo: "https://github.com/sharelatex/spelling-sharelatex.git", {
version: "master" name: 'chat',
}, { repo: 'https://github.com/sharelatex/chat-sharelatex.git',
name: "contacts", version: 'master',
repo: "https://github.com/sharelatex/contacts-sharelatex.git", },
version: "master" {
}, { name: 'spelling',
name: "notifications", repo: 'https://github.com/sharelatex/spelling-sharelatex.git',
repo: "https://github.com/sharelatex/notifications-sharelatex.git", version: 'master',
version: "master" },
}] {
name: 'contacts',
repo: 'https://github.com/sharelatex/contacts-sharelatex.git',
version: 'master',
},
{
name: 'notifications',
repo: 'https://github.com/sharelatex/notifications-sharelatex.git',
version: 'master',
},
]