Skip to content

Commit

Permalink
simplify prettier checks commands, remove script/pretty.js (#3259)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina authored Jun 22, 2023
1 parent b8a597e commit 4a6f516
Show file tree
Hide file tree
Showing 44 changed files with 128 additions and 379 deletions.
40 changes: 0 additions & 40 deletions .eslintignore

This file was deleted.

4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
module.exports = {
root: true,
reportUnusedDisableDirectives: true,
ignorePatterns: [
// CRA example has its own eslint config
'examples/graphiql-create-react-app',
],
overrides: [
{
// Rules for all code files
Expand Down
28 changes: 14 additions & 14 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
blank_issues_enabled: true
contact_links:
- name: "📚 Support/Q&A"
- name: '📚 Support/Q&A'
url: https://github.com/graphql/graphiql/discussions/categories/q-a-support
about: >-
Some questions are already answered in our github discussions Q&A section
If you don't find an answer, [create a support ticket](ttps://github.com/graphql/graphiql/discussions/new?category=q-a-support)
Some questions are already answered in our github discussions Q&A section If you don't find an answer, [create a support ticket](ttps://github.com/graphql/graphiql/discussions/new?category=q-a-support)
- name: "💬 `graphiql` Discord Support"
- name: '💬 `graphiql` Discord Support'
url: https://discord.gg/NP5vbPeUFp
about: "`graphiql` Discord Support Channel"
about: '`graphiql` Discord Support Channel'

- name: "💬 `vscode-graphql` Discord Support"
- name: '💬 `vscode-graphql` Discord Support'
url: https://discord.gg/bHrQtxGNzQ
about: "`vscode-graphql` Discord Support Channel"
about: '`vscode-graphql` Discord Support Channel'

- name: "💬 GraphQL LSP & CLI Discord Support"
- name: '💬 GraphQL LSP & CLI Discord Support'
url: https://discord.gg/wkQCKwazxj
about: >-
GraphQL LSP (Language Server Protocol) Server Discord Support Channel
For `graphql-language-service-server` and/or `graphql-language-service-cli`
GraphQL LSP (Language Server Protocol) Server Discord Support Channel For `graphql-language-service-server` and/or `graphql-language-service-cli`
- name: "💬 `monaco-graphql` Discord Support"
- name: '💬 `monaco-graphql` Discord Support'
url: https://discord.gg/r4BxrAG6fN
about: "`monaco-graphql` Discord Support Channel"
about: '`monaco-graphql` Discord Support Channel'

- name: "💬 `codedemirror-graphql` Discord Support"
- name: '💬 `codedemirror-graphql` Discord Support'
url: https://discord.gg/cffZwk8NJW
about: "`codemirror-graphql` Discord Support Channel"
about: '`codemirror-graphql` Discord Support Channel'
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/graphiql-bug.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: GraphiQL 🐞 Bug
description: File a bug with the graphiql web editor
title: "[graphiql] <title>"
title: '[graphiql] <title>'
labels: [bug, needs triage, graphiql]
body:
- type: checkboxes
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/language-server-bug.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Generic IDE (LSP Server) Bug 🐞
description: File any non syntax highlighting related bugs in vscode or any IDE lsp runtime (vim, intellij, emacs, sublime, etc), with the `graphql-language-service-server` / `graphql-lsp` CLI
title: "[lsp-server] 🐞 <title>"
title: '[lsp-server] 🐞 <title>'
labels: [bug, lsp-server]
body:
- type: checkboxes
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/monaco-graphql-bug.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Monaco GraphQL Bug
description: Report a bug for `monaco-graphql`
title: "[monaco-graphql] <title>"
title: '[monaco-graphql] <title>'
labels: [monaco-graphql, bug, needs triage]
body:
- type: checkboxes
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/vscode-graphql-syntax-bug.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: VSCode GraphQL Syntax Bug
description: Report a bug for `vscode-graphql-syntax`
title: "[vscode-graphql-syntax] <title>"
title: '[vscode-graphql-syntax] <title>'
labels: [vscode-graphql-syntax, bug, needs triage]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- label: I have searched the existing issues
required: true
3 changes: 0 additions & 3 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,3 @@ jobs:

- name: ESLint
run: yarn lint

- name: Prettier Check
run: yarn pretty-check
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions: {}
jobs:
release:
permissions:
contents: write # for changesets/action to git push
contents: write # for changesets/action to git push
environment: deploy
name: Release
runs-on: ubuntu-latest
Expand Down
38 changes: 22 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,23 @@
.*.haste_cache.*
.DS_Store
.secrets
npm-debug.log
yarn-error.log
*.log

node_modules/
coverage/
.nyc_output
packages/**/dist/.gitignore
packages/**/dist/.npmignore
packages/graphiql/typedoc
dist
esm
cjs
bundle
packages/graphiql/typedoc/
dist/
esm/
*.vsix
*.tsbuildinfo

cypress/screenshots
lerna-debug.log
**/tsconfig.tsbuildinfo
**/*.tsbuildinfo

.yarnrc
yarn-1.18.0.js
*.orig
.idea/

# Local Netlify folder
.netlify
.netlify/

examples/*/yarn.lock
package-lock.json
Expand All @@ -40,3 +30,19 @@ vite.config.js

.next/
.turbo/
types/
packages/codemirror-graphql/cm6-legacy/
packages/codemirror-graphql/results/
packages/codemirror-graphql/utils/
packages/codemirror-graphql/variables/
packages/codemirror-graphql/*.js
packages/codemirror-graphql/*.d.ts
packages/codemirror-graphql/*.map
!packages/codemirror-graphql/*.config.js

packages/graphiql/index.html
packages/graphiql/analyzer.html
packages/graphiql/graphiql.*.js
packages/graphiql/*.css
packages/graphiql/*.map
packages/graphiql/cypress/screenshots/
14 changes: 12 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
js-green-licenses.json
.changeset
.changeset/

# ignore working-group dir markdown so it's easier for people to edit from the UI
working-group/
packages/codemirror-graphql/src/__tests__/schema-kitchen-sink.graphql
CHANGELOG.md

# bug in v3 https://github.com/prettier/prettier/issues/14964
packages/graphql-language-service/benchmark/fixtures/github.graphql

# remove after merge of https://github.com/graphql/graphiql/pull/3256
*.flow
2 changes: 2 additions & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ lezer
buildhelper
sonarjs
svgr
prettierignore
pnpm

// identifiers used in code and configs
acmerc
Expand Down
2 changes: 1 addition & 1 deletion examples/cm6-graphql-legacy-parcel/src/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<style>
Expand Down
2 changes: 1 addition & 1 deletion examples/cm6-graphql-parcel/src/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<style>
Expand Down
2 changes: 1 addition & 1 deletion examples/graphiql-cdn/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
-->
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<title>GraphiQL</title>
Expand Down
2 changes: 1 addition & 1 deletion examples/graphiql-create-react-app/public/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/graphiql-parcel/src/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<style>
Expand Down
2 changes: 1 addition & 1 deletion examples/monaco-graphql-react-vite/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"build-bundles-clean": "rimraf '{packages,examples,plugins}/**/{bundle,cdn,webpack}' && yarn workspace graphiql run build-bundles-clean",
"build-clean": "wsrun -m build-clean",
"build-demo": "wsrun -m -s build-demo",
"build-docs": "rimraf 'packages/graphiql/typedoc' && typedoc 'packages'",
"build-docs": "rimraf packages/graphiql/typedoc && typedoc packages",
"build:clean": "yarn tsc --clean && yarn tsc --clean resources/tsconfig.graphiql.json",
"build:cm6-graphql": "yarn workspace cm6-graphql run build",
"build:graphiql": "yarn tsc resources/tsconfig.graphiql.json",
Expand All @@ -52,7 +52,7 @@
"dev-graphiql": "yarn workspace graphiql dev",
"e2e": "yarn run e2e:build && yarn workspace graphiql e2e",
"e2e:build": "yarn build && yarn workspace graphiql build-bundles-min",
"eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --max-warnings=0 --cache .",
"eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --max-warnings=0 --ignore-path .gitignore --cache .",
"format": "yarn eslint --fix && yarn pretty",
"jest": "jest --testPathIgnorePatterns cm6-graphql",
"license-check": "jsgl --local ./",
Expand All @@ -63,8 +63,8 @@
"postbuild": "yarn workspace codemirror-graphql run postbuild",
"prebuild-bundles": "yarn build-bundles-clean",
"prepublishOnly": "./scripts/prepublish.sh",
"pretty": "node scripts/pretty.js",
"pretty-check": "node scripts/pretty.js --check",
"pretty": "yarn pretty-check --write",
"pretty-check": "prettier --cache --check --ignore-path .gitignore --ignore-path .prettierignore .",
"ci:version": "yarn changeset version && yarn build && yarn format",
"release": "yarn build && yarn build-bundles && (wsrun release --exclude-missing --serial --recursive --changedSince main || true) && yarn changeset publish",
"release:canary": "(node scripts/canary-release.js && yarn build && yarn build-bundles && yarn changeset publish --tag canary) || echo Skipping Canary...",
Expand Down Expand Up @@ -102,7 +102,6 @@
"@types/fetch-mock": "^7.3.2",
"@types/jest": "^29.5.2",
"@types/node": "^16.18.4",
"@types/prettier": "^2.7.0",
"@types/ws": "^7.4.0",
"@typescript-eslint/eslint-plugin": "6.0.0-alpha.159",
"@typescript-eslint/parser": "6.0.0-alpha.159",
Expand Down Expand Up @@ -133,7 +132,7 @@
"js-green-licenses": "3.0.0",
"lint-staged": "^10.1.2",
"mkdirp": "^1.0.4",
"prettier": "^2.8.8",
"prettier": "^3.0.0-alpha.12",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.5",
"typedoc": "^0.19.2",
Expand Down
5 changes: 4 additions & 1 deletion packages/cm6-graphql/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ export interface IPosition {
}

export class Position implements IPosition {
constructor(public line: number, public character: number) {}
constructor(
public line: number,
public character: number,
) {}

setLine(line: number) {
this.line = line;
Expand Down
14 changes: 0 additions & 14 deletions packages/codemirror-graphql/.gitignore

This file was deleted.

25 changes: 0 additions & 25 deletions packages/graphiql-plugin-code-exporter/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion packages/graphiql-plugin-code-exporter/examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
-->
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<title></title>
Expand Down
Loading

0 comments on commit 4a6f516

Please sign in to comment.