diff --git a/.circleci/config.yml b/.circleci/config.yml index 9d77a5e1940..8a6051da0af 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -73,16 +73,6 @@ jobs: docker: [{ image: 'circleci/node:12' }] <<: *common_test_steps - # Other tests, unrelated to typical code tests. - Linting: - docker: [{ image: 'circleci/node:10' }] - steps: - # (speed) Intentionally omitted, unnecessary, run_install_desired_npm. - - checkout - # (speed) --ignore-scripts to skip unnecessary Lerna build during linting. - - run: npm install --ignore-scripts - - run: npm run lint - # XXX We used to use this filter to only run a "Docs" job on docs branches. # Now we use it to disable all jobs. It's unclear if there's a simpler way # to do this! @@ -104,5 +94,3 @@ workflows: <<: *ignore_doc_branches - Node.js 12: <<: *ignore_doc_branches - - Linting: - <<: *ignore_doc_branches diff --git a/.vscode/settings.json b/.vscode/settings.json index 2802354f200..4085c295aaa 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,12 @@ // Place your settings in this file to overwrite default and user settings. { "editor.tabSize": 2, + // You're welcome to use Prettier on code hunks that are directly related to + // your changes but we ask that, rather than using "Format Document" or + // `editor.formatOnSave`, you instead highlight your changes and choose + // "Format Selection" (Windows: Ctrl-K Ctrl-F; Mac: Cmd-K Cmd-F) to avoid + // destructive formatting changes to entire files. Thanks for understanding! + "editor.formatOnSave": false, "editor.rulers": [80], "editor.wordWrapColumn": 80, "files.trimTrailingWhitespace": true, diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 392bd3c1abd..c48c2153032 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -79,7 +79,7 @@ It’s important that every piece of code in Apollo packages is reviewed by at l 3. **Testing.** Do the tests ensure this code won’t break when other stuff changes around it? When it does break, will the tests added help us identify which part of the library has the problem? Did we cover an appropriate set of edge cases? Look at the test coverage report if there is one. Are all significant code paths in the new code exercised at least once? 4. **No unnecessary or unrelated changes.** PRs shouldn’t come with random formatting changes, especially in unrelated parts of the code. If there is some refactoring that needs to be done, it should be in a separate PR from a bug fix or feature, if possible. 5. **Code has appropriate comments.** Code should be commented, or written in a clear “self-documenting” way. -6. **Idiomatic use of the language.** In TypeScript, make sure the typings are specific and correct. In ES2015, make sure to use imports rather than require and const instead of var, etc. Ideally a linter enforces a lot of this, but use your common sense and follow the style of the surrounding code. +6. **Idiomatic use of the language.** In TypeScript, make sure the typings are specific and correct. In ES2015, make sure to use imports rather than require and const instead of var, etc. Use your common sense and follow the style of the surrounding code. ## New contributors diff --git a/package-lock.json b/package-lock.json index d497cfd29ef..c79754e2256 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4923,12 +4923,6 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, "builtins": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", @@ -5320,7 +5314,8 @@ "version": "2.17.1", "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", - "dev": true + "dev": true, + "optional": true }, "compare-func": { "version": "1.3.2", @@ -6086,12 +6081,6 @@ "streamsearch": "0.1.2" } }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, "diff-sequences": { "version": "24.9.0", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.9.0.tgz", @@ -13534,71 +13523,6 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, - "prettier": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz", - "integrity": "sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==", - "dev": true - }, - "prettier-check": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prettier-check/-/prettier-check-2.0.0.tgz", - "integrity": "sha512-HZG53XQTJ9Cyi5hi1VFVVFxdlhITJybpZAch3ib9KqI05VUxV+F5Hip0GhSWRItrlDzVyqjSoDQ9KqIn7AHYyw==", - "dev": true, - "requires": { - "execa": "^0.6.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.6.3.tgz", - "integrity": "sha1-V7aaWU8IF1nGnlNw8NF7nLEWWP4=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, "pretty-format": { "version": "24.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.7.0.tgz", @@ -13723,12 +13647,6 @@ "ipaddr.js": "1.8.0" } }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, "psl": { "version": "1.1.31", "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", @@ -15291,36 +15209,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" }, - "tslint": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.19.0.tgz", - "integrity": "sha512-1LwwtBxfRJZnUvoS9c0uj8XQtAnyhWr9KlNvDIdB+oXyT+VpsOAaEhEgKi1HrZ8rq0ki/AAnbGSv4KM6/AfVZw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^3.2.0", - "glob": "^7.1.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.29.0" - } - }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", diff --git a/package.json b/package.json index 79369cf6a7d..372d81b1517 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,6 @@ "release:server": "npm run release -- --force-publish=apollo-server,apollo-server-core,apollo-server-azure-functions,apollo-server-cloud-functions,apollo-server-cloudflare,apollo-server-express,apollo-server-fastify,apollo-server-hapi,apollo-server-koa,apollo-server-lambda,apollo-server-micro,apollo-server-testing,apollo-server-integration-testsuite,apollo-server-env,apollo-tracing,apollo-server-types,graphql-extensions,apollo-cache-control,apollo-datasource,apollo-engine-reporting,apollo-server-errors,apollo-server-plugin-base", "release:federation": "npm run release -- --force-publish=@apollo/federation,@apollo/gateway", "postinstall": "lerna run prepare && npm run compile", - "lint": "prettier-check '**/*.{js,ts}'", - "lint-fix": "prettier '**/*.{js,ts}' --write", "test": "jest --verbose", "test:clean": "jest --clearCache", "test:watch": "jest --verbose --watchAll", @@ -123,8 +121,6 @@ "mock-req": "0.2.0", "nock": "10.0.6", "node-fetch": "2.3.0", - "prettier": "1.18.2", - "prettier-check": "2.0.0", "qs-middleware": "1.0.3", "request": "2.88.0", "request-promise": "4.2.4", @@ -132,7 +128,6 @@ "supertest": "4.0.2", "test-listen": "1.1.0", "ts-jest": "24.0.2", - "tslint": "5.19.0", "typescript": "3.5.3", "ws": "6.2.1" },