Skip to content

Commit

Permalink
ci: fix jest/cypress clash that broke eslint locally
Browse files Browse the repository at this point in the history
  • Loading branch information
acao committed Nov 23, 2019
1 parent a3f4d1a commit 0bd59f2
Show file tree
Hide file tree
Showing 18 changed files with 106 additions and 14,377 deletions.
20 changes: 14 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

module.exports = {
Expand All @@ -21,9 +20,9 @@ module.exports = {
},
},
settings: {
'react': {
'version': 'detect'
}
react: {
version: 'detect',
},
},
// https://github.com/sindresorhus/globals/blob/master/globals.json
env: {
Expand All @@ -33,7 +32,6 @@ module.exports = {
jest: true,
mocha: true,
browser: true,
'cypress/globals': true
},

extends: ['prettier', 'plugin:import/typescript', 'plugin:react/recommended'],
Expand Down Expand Up @@ -292,9 +290,19 @@ module.exports = {
'prefer-object-spread/prefer-object-spread': 1,
},

plugins: ['babel', 'import', 'flowtype', 'prefer-object-spread', 'cypress'],
plugins: ['babel', 'import', 'flowtype', 'prefer-object-spread'],

overrides: [
// Cypress plugin, global, etc only for cypress directory
// https://github.com/cypress-io/eslint-plugin-cypress
// cypress clashes with jest expect()
{
files: ['**/cypress/**'],
plugins: ['cypress'],
env: {
'cypress/globals': true,
},
},
// Rules for TypeScript only
{
files: ['*.ts', '*.tsx'],
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"jest-environment-jsdom": "^24.8.0",
"jest-environment-jsdom-global": "^1.2.0",
"lerna": "^3.16.4",
"mkdirp": "^0.5.1",
"mocha": "6.1.4",
"prettier": "^1.18.2",
"rimraf": "^3.0.0",
Expand Down
4 changes: 0 additions & 4 deletions packages/codemirror-graphql/.npmignore

This file was deleted.

20 changes: 16 additions & 4 deletions packages/codemirror-graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,21 @@
},
"license": "MIT",
"files": [
"esm",
"*.js",
"*.flow",
"hint.esm.js",
"hint.js",
"hint.js.flow",
"info.esm.js",
"info.js",
"info.js.flow",
"jump.esm.js",
"jump.js",
"jump.js.flow",
"lint.esm.js",
"lint.js",
"lint.js.flow",
"mode.esm.js",
"mode.js",
"mode.js.flow",
"utils",
"variables",
"results"
Expand All @@ -31,7 +43,7 @@
"build": "yarn build-clean && yarn build-js && yarn build-esm && yarn build-flow .",
"build-js": "babel src --root-mode upward --ignore src/__tests__ --out-dir . && babel src --root-mode upward --ignore src/__tests__ --out-dir esm && node ../../resources/renameFileExtensions.js './esm/**/*.js' . .esm.js",
"build-esm": "ESM=true babel src --root-mode upward --ignore src/__tests__ --out-dir esm",
"build-clean": "rimraf {mode,hint,info,jump,lint}.{js,js.flow} && rimraf esm results utils variables coverage __tests__",
"build-clean": "rimraf {mode,hint,info,jump,lint}.{js,esm.js,js.flow} && rimraf esm results utils variables coverage __tests__",
"build-flow": "node ../../resources/buildFlow.js",
"watch": "babel --optional runtime resources/watch.js | node",
"prepublish": "node ../../resources/prepublish.js",
Expand Down
1 change: 0 additions & 1 deletion packages/graphiql/.babelrc.js

This file was deleted.

10 changes: 10 additions & 0 deletions packages/graphiql/graphiql.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/graphiql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"build-demo": "cp resources/index.html .",
"check": "flow check",
"dev": "babel-node test/server.js",
"e2e": "yarn e2e:server && cypress run && kill -9 `cat test/pid`",
"e2e": "yarn e2e:server && cypress run",
"e2e:server": "PORT=8080 node test/e2e-server & wait-on http://localhost:8080",
"test": "node ../../resources/runTests ENZYME=true"
},
Expand Down
3,856 changes: 0 additions & 3,856 deletions packages/graphql-language-service-interface/tsconfig.esm.tsbuildinfo

This file was deleted.

3,503 changes: 0 additions & 3,503 deletions packages/graphql-language-service-parser/tsconfig.esm.tsbuildinfo

This file was deleted.

2 changes: 1 addition & 1 deletion packages/graphql-language-service-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"main": "dist/index.js",
"module": "esm/index.js",
"typings": "src/index.ts",
"typings": "dist/index.d.ts",
"scripts": {
"build": "yarn run build-ts && yarn run build-flow",
"build-ts": "tsc",
Expand Down
3,426 changes: 0 additions & 3,426 deletions packages/graphql-language-service-types/tsconfig.esm.tsbuildinfo

This file was deleted.

6 changes: 4 additions & 2 deletions packages/graphql-language-service-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
},
"license": "MIT",
"files": [
"dist",
"esm"
"dist"
],
"keywords": [
"graphql"
Expand All @@ -40,5 +39,8 @@
"dependencies": {
"graphql-config": "2.2.1",
"graphql-language-service-types": "^1.5.0"
},
"devDependencies": {
"@types/jest": "^24.0.23"
}
}
4 changes: 3 additions & 1 deletion packages/graphql-language-service-utils/src/file.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ describe('requireFile', () => {
);
});
it('should require file with no extension using js', async () => {
const config = await requireFile(path.join(__dirname, '../../../jest.config'));
const config = await requireFile(
path.join(__dirname, '../../../jest.config'),
);
await expect(config.collectCoverage).toEqual(true);
});
it('should require file with no extension using json', async () => {
Expand Down
7 changes: 6 additions & 1 deletion packages/graphql-language-service-utils/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@
"compilerOptions": {
"rootDir": "./src",
"outDir": "./esm",
}
},
"references": [
{
"path": "../graphql-language-service-types"
}
]
}
Loading

0 comments on commit 0bd59f2

Please sign in to comment.