-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: update prettier config for *.rc file * feat: *rc, *.json file use 'json-stringify' parser * feat: add prettier-config * feat: make prettier parse to json in tsconfig file * feat: lint @mjolnir/prettier-config * feat: change prettier config ext * feat: prettier all files * feat: add jsonc format files to prettier * feat: update prettier override * chore: format tsconfig.json
- Loading branch information
Showing
34 changed files
with
174 additions
and
334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"extends": ["@commitlint/config-conventional"] | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"extends": ["@mjolnir/eslint-config/node", "plugin:prettier/recommended"], | ||
"extends": [ | ||
"@mjolnir/eslint-config/node", | ||
"plugin:prettier/recommended" | ||
], | ||
"rules": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/lintstagedrc.schema", | ||
"**/*.{js, ts}": ["prettier --write", "eslint --fix", "git add"] | ||
"**/*.{js, ts}": [ | ||
"eslint --fix", | ||
"git add" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/prettierrc", | ||
"printWidth": 80, | ||
"singleQuote": true, | ||
"arrowParens": "always" | ||
} | ||
"@mjolnir/prettier-config" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
{ "language": "typescriptreact", "autoFix": true } | ||
], | ||
"cSpell.words": [ | ||
"mjolnir" | ||
"mjolnir", | ||
"mjolnirjs" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
{ | ||
"changelog": { | ||
"repo": "mjolnirjs/mjolnir", | ||
"cacheDir": ".changelog" | ||
}, | ||
"$schema": "http://json.schemastore.org/lerna", | ||
"npmClient": "yarn", | ||
"version": "independent", | ||
"useWorkspaces": true | ||
"useWorkspaces": true, | ||
"command": { | ||
"version": { | ||
"conventionalCommits": true | ||
}, | ||
"publish": { | ||
"message": "chore(release): publish" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,5 @@ | |
module.exports = { | ||
parser: 'babel-eslint', | ||
plugins: ['babel'], | ||
rules: {} | ||
rules: {}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
|
||
module.exports = { | ||
plugins: ['react'], | ||
rules: {} | ||
rules: {}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,8 @@ module.exports = { | |
{ | ||
react: false, | ||
typescript: true, | ||
modules: "commonjs" | ||
} | ||
] | ||
] | ||
modules: 'commonjs', | ||
}, | ||
], | ||
], | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": [ | ||
"@mjolnir/eslint-config/typescript", | ||
"plugin:prettier/recommended" | ||
], | ||
"rules": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# @mjolnir/prettier-config | ||
|
||
## install | ||
`yarn add @mjolnir/prettier-config -D` | ||
|
||
## useage | ||
|
||
add it in your `package.json`: | ||
``` | ||
{ | ||
"prettier": "@mjolnir/prettier-config" | ||
} | ||
``` | ||
|
||
if you want to extends the configuration and overwrite some properties, import the file in a `.prettierrc.js` file and export the modifications: | ||
|
||
```js | ||
module.exports = { | ||
...require("@mjolnir/prettier-config"); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
htmlWhitespaceSensitivity: 'ignore', | ||
overrides: [ | ||
{ | ||
files: ['.*rc', '*.json'], | ||
options: { | ||
parser: 'json-stringify', | ||
}, | ||
}, | ||
{ | ||
// special file use jsonc format | ||
files: [ | ||
'.vscode/*.json', | ||
'jsconfig.json', | ||
'tsconfig.json', | ||
'tsconfig.*.json', | ||
'tsconfig-*.json', | ||
'tsconfig.json', | ||
'.babelrc', | ||
'.eslintrc', | ||
'.eslintrc.json', | ||
'tslint.json', | ||
'tslint.*.json', | ||
], | ||
options: { | ||
parser: 'json', | ||
}, | ||
}, | ||
], | ||
}; |
Oops, something went wrong.