Commit 4fb427a0 authored by Tamlyn Rhodes's avatar Tamlyn Rhodes

Consolidate linting and prettier configs

Remove configs from sub packages and move everything to root.
Pass CSS, SCSS, JSON and Markdown through Prettier too.
parent f2904a0a
{
"*.{js,jsx}": ["prettier --write", "eslint --fix", "git add"],
"*.{css,scss}": ["prettier --write", "stylelint", "git add"],
"*.{json,md}": ["prettier --write", "git add"]
}
{
"extends": "stylelint-config-pubsweet"
"extends": ["stylelint-config-pubsweet", "stylelint-config-prettier"]
}
......@@ -7,7 +7,6 @@
"babel-preset-es2015": "^6.24.1",
"eslint": "^4.13.1",
"eslint-config-pubsweet": "^0.0.6",
"eslint-config-stylelint": "^8.0.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jest": "^21.4.2",
"eslint-plugin-jsx-a11y": "^6.0.2",
......@@ -21,8 +20,8 @@
"lint-staged": "^6.0.0",
"prettier": "^1.8.2",
"stylelint": "^8.2.0",
"stylelint-config-pubsweet": "^0.0.3",
"stylelint-config-standard": "^18.0.0"
"stylelint-config-prettier": "^2.0.0",
"stylelint-config-pubsweet": "^0.0.3"
},
"scripts": {
"clean": "lerna clean",
......@@ -30,18 +29,7 @@
"lint": "npm run lint:js && npm run lint:style",
"lint:js": "eslint packages",
"lint:style": "stylelint packages/**/*.scss packages/**/*.css",
"precommit": "lerna run --concurrency 1 --stream precommit"
"precommit": "lint-staged"
},
"lint-staged": {
"*.js": [
"eslint",
"git add"
],
"*.css": "stylelint",
"*.scss": "stylelint"
},
"workspaces": [
"packages/*",
"packages/components/packages/*"
]
"workspaces": ["packages/*", "packages/components/packages/*"]
}
......@@ -4,16 +4,14 @@
"description": "Pubsweet command-line interface, app generator and manager",
"bin": "./bin/pubsweet.js",
"scripts": {
"lint": "eslint bin src cli test",
"test:mocked": "NODE_ENV=test jest ./test/cli",
"vuln-test": "nsp check --output checkstyle",
"test:ci": "gitlab-ci-multi-runner exec docker --docker-image=pubsweet/pubsweet-test-base test:node",
"test:debug": "node --inspect-brk ./node_modules/.bin/jest --debug --runInBand --no-watchman --no-cache --env jest-environment-node-debug"
"test:ci":
"gitlab-ci-multi-runner exec docker --docker-image=pubsweet/pubsweet-test-base test:node",
"test:debug":
"node --inspect-brk ./node_modules/.bin/jest --debug --runInBand --no-watchman --no-cache --env jest-environment-node-debug"
},
"keywords": [
"pubsweet",
"cli"
],
"keywords": ["pubsweet", "cli"],
"author": "Collaborative Knowledge Foundation",
"license": "MIT",
"dependencies": {
......@@ -40,36 +38,19 @@
"url": "https://gitlab.coko.foundation/pubsweet/pubsweet-cli"
},
"devDependencies": {
"@pubsweet/starter": "git+https://gitlab.coko.foundation/pubsweet/pubsweet-starter.git",
"eslint": "^4.8.0",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1",
"@pubsweet/starter":
"git+https://gitlab.coko.foundation/pubsweet/pubsweet-starter.git",
"jest": "^21.0.0",
"nsp": "^2.8.1"
},
"jest": {
"testMatch": [
"**/test/*.js",
"**/test/cli/*.js"
],
"testPathIgnorePatterns": [
"<rootDir>/build/"
],
"testMatch": ["**/test/*.js", "**/test/cli/*.js"],
"testPathIgnorePatterns": ["<rootDir>/build/"],
"collectCoverage": true,
"collectCoverageFrom": [
"src/*.js",
"cli/*.js"
],
"modulePaths": [
"<rootDir>/node_modules"
],
"collectCoverageFrom": ["src/*.js", "cli/*.js"],
"modulePaths": ["<rootDir>/node_modules"],
"testEnvironment": "node",
"unmockedModulePathPatterns": [
"/src/models"
],
"unmockedModulePathPatterns": ["/src/models"],
"verbose": true
}
}
{
"*.{js, jsx}": ["prettier --write", "eslint --fix", "git add"]
}
{
"singleQuote": true,
"semi": false,
"printWidth": 80,
"trailingComma": "all"
}
......@@ -4,8 +4,6 @@
"main": "src/index.js",
"scripts": {
"compile": "babel -d lib/ src/",
"lint": "eslint --ext js,jsx src test",
"precommit": "lint-staged",
"test": "jest",
"testci": "gitlab-ci-multi-runner exec docker test"
},
......@@ -18,14 +16,11 @@
"dependencies": {
"authsome": "0.0.9",
"config": "^1.21.0",
"eslint-config-prettier": "^2.6.0",
"event-source-polyfill": "^0.0.10",
"global": "^4.3.1",
"husky": "^0.14.3",
"isomorphic-fetch": "^2.1.1",
"lint-staged": "^6.0.0",
"lodash": "^4.0.0",
"prettier": "^1.7.4",
"prop-types": "^15.5.8",
"pubsweet-component-login": "^0.5.2",
"react": "^15.4.4",
......@@ -44,22 +39,13 @@
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"enzyme": "^2.9.1",
"eslint": "^4.8.0",
"eslint-config-pubsweet": "^0.0.6",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-react": "^7.4.0",
"eslint-plugin-standard": "^3.0.1",
"eventsourcemock": "^1.0.1",
"isomorphic-form-data": "^1.0.0",
"jest": "^21.2.1",
"nock": "^9.0.14",
"react-dom": "^15.6.1",
"react-test-renderer": "^15.6.1",
"redux-mock-store": "^1.3.0",
"stylelint-config-standard": "^18.0.0"
"redux-mock-store": "^1.3.0"
},
"peerDependencies": {
"pubsweet-server": "^1.0.0"
......@@ -71,9 +57,7 @@
"jest": {
"testRegex": "/test/.+test.jsx?$",
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*.{js,jsx}"
],
"collectCoverageFrom": ["src/**/*.{js,jsx}"],
"globals": {
"window": {}
}
......
......@@ -2,7 +2,6 @@
"name": "pubsweet-components",
"version": "0.0.0",
"scripts": {
"lint": "eslint 'packages/*/*.{js,jsx}'",
"styleguide": "styleguidist server",
"test": "jest --coverage"
},
......@@ -19,7 +18,6 @@
"config": "^1.28.1",
"css-loader": "^0.28.7",
"enzyme": "^2.9.1",
"eslint": "^4.13.0",
"express": "^4.15.4",
"file-loader": "^0.11.2",
"font-awesome": "^4.7.0",
......@@ -51,12 +49,7 @@
"moduleNameMapper": {
"\\.s?css$": "identity-obj-proxy"
},
"transformIgnorePatterns": [
"/node_modules/(?!pubsweet)"
],
"testPathIgnorePatterns": [
"/node_modules",
"config/"
]
"transformIgnorePatterns": ["/node_modules/(?!pubsweet)"],
"testPathIgnorePatterns": ["/node_modules", "config/"]
}
}
{
"*.{js, jsx}": ["prettier --write", "eslint --fix", "git add"]
}
{
"singleQuote": true,
"semi": false,
"printWidth": 80,
"trailingComma": "all"
}
......@@ -5,51 +5,32 @@
"main": "src/index.js",
"scripts": {
"lint": "eslint src test",
"precommit": "lint-staged",
"test:ci": "gitlab-runner exec docker --docker-image=pubsweet/pubsweet-test-base test:node",
"test:ci":
"gitlab-runner exec docker --docker-image=pubsweet/pubsweet-test-base test:node",
"vuln-test": "nsp check --output checkstyle"
},
"repository": {
"type": "git",
"url": "git@gitlab.coko.foundation:yld/db-manager.git"
},
"keywords": [
"pubsweet",
"database"
],
"keywords": ["pubsweet", "database"],
"engines": {
"node": ">=7.9.0",
"npm": ">=3.0.0"
},
"jest": {
"testMatch": [
"**/test/**/*.js"
],
"testMatch": ["**/test/**/*.js"],
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*.js"
],
"modulePaths": [
"<rootDir>/node_modules"
],
"collectCoverageFrom": ["src/**/*.js"],
"modulePaths": ["<rootDir>/node_modules"],
"testEnvironment": "node",
"verbose": true
},
"author": "Samuel Galson",
"license": "MIT",
"devDependencies": {
"eslint": "^4.13.1",
"eslint-config-prettier": "^2.6.0",
"eslint-config-standard": "^11.0.0-beta.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1",
"husky": "^0.14.3",
"jest": "^21.1.0",
"lint-staged": "^6.0.0",
"nsp": "^2.8.0",
"prettier": "^1.7.4"
"nsp": "^2.8.0"
},
"dependencies": {
"@pubsweet/logger": "^0.0.1",
......
{
"name": "@pubsweet/logger",
"version": "0.0.1",
"description": "A module encapsulating standard logging features for pubsweet components and services.",
"description":
"A module encapsulating standard logging features for pubsweet components and services.",
"main": "src/index.js",
"scripts": {
"test": "jest",
"lint": "eslint src test",
"vuln-test": "nsp check --output checkstyle"
},
"repository": {
"type": "git",
"url": "git@gitlab.coko.foundation:pubsweet/pubsweet-logger.git"
},
"keywords": [
"logger",
"pubsweet"
],
"keywords": ["logger", "pubsweet"],
"engines": {
"node": ">=7.9.0",
"npm": ">=3.0.0"
......@@ -24,27 +21,15 @@
"license": "MIT",
"devDependencies": {
"bunyan": "^1.8.12",
"eslint": "^4.5.0",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1",
"jest": "^21.2.1",
"nsp": "^2.7.0",
"winston": "^2.3.1"
},
"jest": {
"testMatch": [
"**/test/**/*.js"
],
"testMatch": ["**/test/**/*.js"],
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*.js"
],
"modulePaths": [
"<rootDir>/node_modules"
],
"collectCoverageFrom": ["src/**/*.js"],
"modulePaths": ["<rootDir>/node_modules"],
"testEnvironment": "node",
"verbose": true
},
......
......@@ -50,16 +50,9 @@
"winston": "^2.2.0"
},
"devDependencies": {
"eslint": "^4.0.0",
"eslint-config-standard": "^11.0.0-beta.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1",
"eventsource": "^1.0.4",
"jest-cli": "^21.2.1",
"nsp": "^2.7.0",
"standard": "^10.0.2",
"supertest": "^2.0.0"
},
"repository": {
......@@ -71,8 +64,6 @@
"testEnvironment": "node",
"testRegex": "/test/.*_test.js$",
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*.js"
]
"collectCoverageFrom": ["src/**/*.js"]
}
}
......@@ -3427,17 +3427,6 @@ eslint-config-standard@10.2.1, eslint-config-standard@^10.2.1:
version "10.2.1"
resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-10.2.1.tgz#c061e4d066f379dc17cd562c64e819b4dd454591"
eslint-config-standard@^11.0.0-beta.0:
version "11.0.0-beta.0"
resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-11.0.0-beta.0.tgz#f8afe69803d95c685a4b8392b8793188eb03cbb3"
eslint-config-stylelint@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/eslint-config-stylelint/-/eslint-config-stylelint-8.0.0.tgz#1ee70ddd33f2802db6b074feb30990713b5b50f3"
dependencies:
eslint-plugin-node "^5.2.1"
eslint-plugin-sort-requires "^2.1.0"
eslint-import-resolver-node@^0.2.0:
version "0.2.3"
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz#5add8106e8c928db2cba232bcd9efa846e3da16c"
......@@ -3460,7 +3449,7 @@ eslint-module-utils@^2.0.0, eslint-module-utils@^2.1.1:
debug "^2.6.8"
pkg-dir "^1.0.0"
eslint-plugin-import@^2.7.0, eslint-plugin-import@^2.8.0:
eslint-plugin-import@^2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.8.0.tgz#fa1b6ef31fcb3c501c09859c1b86f1fc5b986894"
dependencies:
......@@ -3506,7 +3495,7 @@ eslint-plugin-jsx-a11y@^6.0.2:
emoji-regex "^6.1.0"
jsx-ast-utils "^1.4.0"
eslint-plugin-node@^5.2.0, eslint-plugin-node@^5.2.1:
eslint-plugin-node@^5.2.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-5.2.1.tgz#80df3253c4d7901045ec87fa660a284e32bdca29"
dependencies:
......@@ -3532,7 +3521,7 @@ eslint-plugin-prettier@^2.3.1:
fast-diff "^1.1.1"
jest-docblock "^21.0.0"
eslint-plugin-promise@^3.5.0, eslint-plugin-promise@^3.6.0:
eslint-plugin-promise@^3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.6.0.tgz#54b7658c8f454813dc2a870aff8152ec4969ba75"
......@@ -3559,10 +3548,6 @@ eslint-plugin-react@~6.10.0:
jsx-ast-utils "^1.3.4"
object.assign "^4.0.4"
eslint-plugin-sort-requires@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-sort-requires/-/eslint-plugin-sort-requires-2.1.0.tgz#3efad948dc83798219e809f54067c40e55444861"
eslint-plugin-standard@^3.0.1, eslint-plugin-standard@~3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz#34d0c915b45edc6f010393c7eef3823b08565cf2"
......@@ -3578,7 +3563,7 @@ eslint-scope@^3.7.1:
esrecurse "^4.1.0"
estraverse "^4.1.1"
eslint@^4.0.0, eslint@^4.13.0, eslint@^4.13.1, eslint@^4.5.0, eslint@^4.8.0:
eslint@^4.13.1:
version "4.13.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.13.1.tgz#0055e0014464c7eb7878caf549ef2941992b444f"
dependencies:
......@@ -10521,6 +10506,10 @@ style-search@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902"
stylelint-config-prettier@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/stylelint-config-prettier/-/stylelint-config-prettier-2.0.0.tgz#0f671435294ebe4a215971855e1e576f5f227a21"
stylelint-config-pubsweet@^0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/stylelint-config-pubsweet/-/stylelint-config-pubsweet-0.0.3.tgz#1f2284a5ffca26dcfa6bfee225b6f65bbcb2d2f5"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment