Skip to content

Commit 928a60f

Browse files
authored
docs: use correct json content in md (#480)
1 parent 93facfb commit 928a60f

File tree

8 files changed

+1404
-2754
lines changed

8 files changed

+1404
-2754
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
CHANGELOG.md
12
test/fixtures

.eslintrc.json

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,32 @@
44
"mocha": true
55
},
66
"extends": [
7-
"plugin:n/recommended",
8-
"plugin:sonar/recommended",
9-
"plugin:sonarjs/recommended",
10-
"plugin:eslint-plugin/recommended",
11-
"prettier"
12-
],
13-
"plugins": [
14-
"self"
7+
"@1stg",
8+
"plugin:eslint-plugin/recommended"
159
],
1610
"rules": {
17-
"self/prettier": [
18-
"error"
19-
],
2011
"eslint-plugin/report-message-format": [
2112
"error",
2213
"^[^a-z].*\\.$"
2314
]
24-
}
15+
},
16+
"overrides": [
17+
{
18+
"files": "*.js",
19+
"plugins": [
20+
"self"
21+
],
22+
"rules": {
23+
"self/prettier": [
24+
"error"
25+
]
26+
}
27+
},
28+
{
29+
"files": "test/*.js",
30+
"rules": {
31+
"no-magic-numbers": "off"
32+
}
33+
}
34+
]
2535
}

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
- 7
1717
- 8
1818
node-version:
19+
- 12
1920
- 14
2021
- 16
21-
- 18
2222

2323
steps:
2424
- uses: actions/checkout@v3

.remarkrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"plugins": [
3+
"@1stg/config"
4+
]
5+
}

README.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ If you’re fixing large of amounts of previously unformatted code, consider tem
114114
- An object representing [options](https://prettier.io/docs/en/options.html) that will be passed into prettier. Example:
115115

116116
```json
117-
"prettier/prettier": ["error", {"singleQuote": true, "parser": "flow"}]
117+
{
118+
"prettier/prettier": ["error", { "singleQuote": true, "parser": "flow" }]
119+
}
118120
```
119121

120122
NB: This option will merge and override any config set with `.prettierrc` files
@@ -126,22 +128,34 @@ If you’re fixing large of amounts of previously unformatted code, consider tem
126128
- `usePrettierrc`: Enables loading of the Prettier configuration file, (default: `true`). May be useful if you are using multiple tools that conflict with each other, or do not wish to mix your ESLint settings with your Prettier configuration.
127129

128130
```json
129-
"prettier/prettier": ["error", {}, {
130-
"usePrettierrc": false
131-
}]
131+
{
132+
"prettier/prettier": [
133+
"error",
134+
{},
135+
{
136+
"usePrettierrc": false
137+
}
138+
]
139+
}
132140
```
133141

134142
- `fileInfoOptions`: Options that are passed to [prettier.getFileInfo](https://prettier.io/docs/en/api.html#prettiergetfileinfofilepath--options) to decide whether a file needs to be formatted. Can be used for example to opt-out from ignoring files located in `node_modules` directories.
135143

136144
```json
137-
"prettier/prettier": ["error", {}, {
138-
"fileInfoOptions": {
139-
"withNodeModules": true
140-
}
141-
}]
145+
{
146+
"prettier/prettier": [
147+
"error",
148+
{},
149+
{
150+
"fileInfoOptions": {
151+
"withNodeModules": true
152+
}
153+
}
154+
]
155+
}
142156
```
143157

144-
- The rule is autofixable -- if you run `eslint` with the `--fix` flag, your code will be formatted according to `prettier` style.
158+
- The rule is auto fixable -- if you run `eslint` with the `--fix` flag, your code will be formatted according to `prettier` style.
145159

146160
---
147161

package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"JounQin (https://github.com/JounQin) <admin@1stg.me>"
1010
],
1111
"license": "MIT",
12-
"packageManager": "yarn@1.22.19",
1312
"engines": {
1413
"node": ">=12.0.0"
1514
},
@@ -26,7 +25,7 @@
2625
"scripts": {
2726
"format": "yarn prettier '**/*.{js,json,md,yml}' --write && yarn lint --fix",
2827
"lint": "eslint . --cache -f friendly --max-warnings 10",
29-
"prepare": "simple-git-hooks && yarn-deduplicate --strategy fewer || exit 0",
28+
"prepare": "patch-package && simple-git-hooks && yarn-deduplicate --strategy fewer || exit 0",
3029
"prerelease": "yarn format && yarn test",
3130
"release": "changeset release",
3231
"test": "yarn lint && mocha"
@@ -44,8 +43,8 @@
4443
"prettier-linter-helpers": "^1.0.0"
4544
},
4645
"devDependencies": {
47-
"@1stg/common-config": "^4.4.0",
48-
"@1stg/eslint-config": "^4.3.0",
46+
"@1stg/common-config": "~3.0.0",
47+
"@1stg/eslint-config": "~3.0.0",
4948
"@changesets/changelog-github": "^0.4.5",
5049
"@changesets/cli": "^2.23.0",
5150
"@graphql-eslint/eslint-plugin": "^2.5.0",
@@ -55,14 +54,17 @@
5554
"eslint-mdx": "^1.17.0",
5655
"eslint-plugin-eslint-plugin": "^4.3.0",
5756
"eslint-plugin-mdx": "^1.17.0",
58-
"eslint-plugin-prettier": "link:.",
5957
"eslint-plugin-self": "^1.2.1",
58+
"eslint-plugin-utils": "^0.1.0",
6059
"graphql": "^16.5.0",
6160
"mocha": "^9.2.2",
61+
"patch-package": "^6.4.7",
6262
"prettier": "^2.7.1",
6363
"vue-eslint-parser": "^8.3.0"
6464
},
6565
"resolutions": {
66-
"@babel/traverse": "^7.18.5"
67-
}
66+
"@babel/traverse": "^7.18.5",
67+
"eslint-plugin-prettier": "link:."
68+
},
69+
"packageManager": "yarn@1.22.19"
6870
}

patches/@pkgr+utils+2.2.0.patch

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
diff --git a/node_modules/@pkgr/utils/lib/index.cjs b/node_modules/@pkgr/utils/lib/index.cjs
2+
index cb7909a..a609f19 100644
3+
--- a/node_modules/@pkgr/utils/lib/index.cjs
4+
+++ b/node_modules/@pkgr/utils/lib/index.cjs
5+
@@ -3,13 +3,13 @@
6+
Object.defineProperty(exports, '__esModule', { value: true });
7+
8+
var child_process = require('child_process');
9+
-var path = require('node:path');
10+
-var node_url = require('node:url');
11+
+var path = require('path');
12+
+var node_url = require('url');
13+
var spawn = require('cross-spawn');
14+
var open = require('open');
15+
var picocolors = require('picocolors');
16+
var module$1 = require('module');
17+
-var fs = require('node:fs');
18+
+var fs = require('fs');
19+
var isGlob = require('is-glob');
20+
21+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

0 commit comments

Comments
 (0)