Skip to content

Commit

Permalink
docs: use correct json content in md
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Jun 29, 2022
1 parent 93facfb commit 5cebbc9
Show file tree
Hide file tree
Showing 7 changed files with 1,315 additions and 2,751 deletions.
1 change: 1 addition & 0 deletions .eslintignore
@@ -1 +1,2 @@
CHANGELOG.md
test/fixtures
34 changes: 22 additions & 12 deletions .eslintrc.json
Expand Up @@ -4,22 +4,32 @@
"mocha": true
},
"extends": [
"plugin:n/recommended",
"plugin:sonar/recommended",
"plugin:sonarjs/recommended",
"plugin:eslint-plugin/recommended",
"prettier"
],
"plugins": [
"self"
"@1stg",
"plugin:eslint-plugin/recommended"
],
"rules": {
"self/prettier": [
"error"
],
"eslint-plugin/report-message-format": [
"error",
"^[^a-z].*\\.$"
]
}
},
"overrides": [
{
"files": "*.js",
"plugins": [
"self"
],
"rules": {
"self/prettier": [
"error"
]
}
},
{
"files": "test/*.js",
"rules": {
"no-magic-numbers": "off"
}
}
]
}
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Expand Up @@ -16,6 +16,7 @@ jobs:
- 7
- 8
node-version:
- 12
- 14
- 16
- 18
Expand Down
5 changes: 5 additions & 0 deletions .remarkrc
@@ -0,0 +1,5 @@
{
"plugins": [
"@1stg/config"
]
}
34 changes: 24 additions & 10 deletions README.md
Expand Up @@ -114,7 +114,9 @@ If you’re fixing large of amounts of previously unformatted code, consider tem
- An object representing [options](https://prettier.io/docs/en/options.html) that will be passed into prettier. Example:

```json
"prettier/prettier": ["error", {"singleQuote": true, "parser": "flow"}]
{
"prettier/prettier": ["error", { "singleQuote": true, "parser": "flow" }]
}
```

NB: This option will merge and override any config set with `.prettierrc` files
Expand All @@ -126,22 +128,34 @@ If you’re fixing large of amounts of previously unformatted code, consider tem
- `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.

```json
"prettier/prettier": ["error", {}, {
"usePrettierrc": false
}]
{
"prettier/prettier": [
"error",
{},
{
"usePrettierrc": false
}
]
}
```

- `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.

```json
"prettier/prettier": ["error", {}, {
"fileInfoOptions": {
"withNodeModules": true
}
}]
{
"prettier/prettier": [
"error",
{},
{
"fileInfoOptions": {
"withNodeModules": true
}
}
]
}
```

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

---

Expand Down
13 changes: 7 additions & 6 deletions package.json
Expand Up @@ -9,7 +9,6 @@
"JounQin (https://github.com/JounQin) <admin@1stg.me>"
],
"license": "MIT",
"packageManager": "yarn@1.22.19",
"engines": {
"node": ">=12.0.0"
},
Expand Down Expand Up @@ -44,8 +43,8 @@
"prettier-linter-helpers": "^1.0.0"
},
"devDependencies": {
"@1stg/common-config": "^4.4.0",
"@1stg/eslint-config": "^4.3.0",
"@1stg/common-config": "~3.0.0",
"@1stg/eslint-config": "~3.0.0",
"@changesets/changelog-github": "^0.4.5",
"@changesets/cli": "^2.23.0",
"@graphql-eslint/eslint-plugin": "^2.5.0",
Expand All @@ -55,14 +54,16 @@
"eslint-mdx": "^1.17.0",
"eslint-plugin-eslint-plugin": "^4.3.0",
"eslint-plugin-mdx": "^1.17.0",
"eslint-plugin-prettier": "link:.",
"eslint-plugin-self": "^1.2.1",
"eslint-plugin-utils": "^0.1.0",
"graphql": "^16.5.0",
"mocha": "^9.2.2",
"prettier": "^2.7.1",
"vue-eslint-parser": "^8.3.0"
},
"resolutions": {
"@babel/traverse": "^7.18.5"
}
"@babel/traverse": "^7.18.5",
"eslint-plugin-prettier": "link:."
},
"packageManager": "yarn@1.22.19"
}

0 comments on commit 5cebbc9

Please sign in to comment.