Skip to content

Commit

Permalink
adjust formatting rules (#195)
Browse files Browse the repository at this point in the history
Signed-off-by: Kangrui Ye <[email protected]>
  • Loading branch information
strawberry-choco authored Oct 3, 2023
1 parent 235dfd2 commit 3a942ee
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 26 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cloudflight/eslint-plugin",
"version": "0.20.5",
"version": "0.21.0",
"private": true,
"volta": {
"node": "18.17.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-angular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can find the directory of all rules including their reasoning [here](src/con
The following dependencies are required:

```
"@cloudflight/eslint-plugin-typescript": ">=0.20.5",
"@cloudflight/eslint-plugin-typescript": ">=0.21.0",
"@rushstack/eslint-patch": "1.2.0",
"eslint": ">=8.0.0 <9.0.0"
```
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cloudflight/eslint-plugin-angular",
"version": "0.20.5",
"version": "0.21.0",
"description": "Cloudflight eslint-plugin & eslint-config for angular",
"volta": {
"extends": "../../package.json"
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can find the directory of all rules including their reasoning [here](src/con
The following dependencies are required:

```
"@cloudflight/eslint-plugin-typescript": ">=0.20.5",
"@cloudflight/eslint-plugin-typescript": ">=0.21.0",
"@rushstack/eslint-patch": "1.2.0",
"eslint": ">=8.0.0 <9.0.0"
```
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cloudflight/eslint-plugin-node",
"version": "0.20.5",
"version": "0.21.0",
"description": "Cloudflight eslint-plugin & eslint-config for node",
"volta": {
"extends": "../../package.json"
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can find the directory of all rules including their reasoning [here](src/con
The following dependencies are required:

```
"@cloudflight/eslint-plugin-typescript": ">=0.20.5",
"@cloudflight/eslint-plugin-typescript": ">=0.21.0",
"@rushstack/eslint-patch": "1.2.0",
"eslint": ">=8.0.0 <9.0.0"
```
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cloudflight/eslint-plugin-react",
"version": "0.20.5",
"version": "0.21.0",
"description": "Cloudflight eslint-plugin & eslint-config for React",
"volta": {
"extends": "../../package.json"
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cloudflight/eslint-plugin-typescript",
"version": "0.20.5",
"version": "0.21.0",
"description": "Cloudflight eslint-plugin & eslint-config for typescript",
"volta": {
"extends": "../../package.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@ export const formatEslintRules: TSESLint.Linter.RulesRecord = {
ignoreEOLComments: false,
},
],
'dot-notation': [
'error',
{
allowKeywords: true,
allowPattern: '',
},
],
'dot-location': ['error', 'property'],
'template-tag-spacing': ['error', 'never'],
'template-curly-spacing': ['error', 'never'],
Expand Down Expand Up @@ -91,13 +84,6 @@ export const formatEslintRules: TSESLint.Linter.RulesRecord = {
after: true,
},
],
quotes: [
'error',
'single',
{
avoidEscape: true,
},
],
'padded-blocks': [
'error',
{
Expand Down Expand Up @@ -272,6 +258,15 @@ export const formatEslintRules: TSESLint.Linter.RulesRecord = {
},
],
'implicit-arrow-linebreak': ['error', 'beside'],
'dot-notation': 'off',
'@typescript-eslint/dot-notation': [
'error',
{
allowKeywords: true,
allowPattern: '',
allowIndexSignaturePropertyAccess: true,
},
],
indent: [
'error',
// eslint-disable-next-line no-magic-numbers -- Indent of 4 spaces.
Expand Down Expand Up @@ -334,6 +329,15 @@ export const formatEslintRules: TSESLint.Linter.RulesRecord = {
ignoreComments: false,
},
],
quotes: 'off',
'@typescript-eslint/quotes': [
'error',
'single',
{
avoidEscape: true,
allowTemplateLiterals: true,
},
],
'jsx-quotes': ['error', 'prefer-double'],
'linebreak-style': ['off', 'unix'],
'object-curly-spacing': ['error', 'never'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ export const typescriptEslintRules: TSESLint.Linter.RulesRecord = {
'no-unused-vars': 'off',
[`${pluginPrefix}/no-unused-vars`]: ['error', {args: 'none', ignoreRestSiblings: true}],
[`${pluginPrefix}/promise-function-async`]: ['error'],
quotes: 'off',
[`${pluginPrefix}/quotes`]: ['error', 'single', {avoidEscape: true, allowTemplateLiterals: true}],
[`${pluginPrefix}/require-array-sort-compare`]: ['error'],
semi: 'off',
[`${pluginPrefix}/semi`]: ['error'],
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can find the directory of all rules including their reasoning [here](src/con
The following dependencies are required:

```
"@cloudflight/eslint-plugin-typescript": ">=0.20.5",
"@cloudflight/eslint-plugin-typescript": ">=0.21.0",
"@rushstack/eslint-patch": "1.2.0",
"eslint": ">=8.0.0 <9.0.0"
```
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cloudflight/eslint-plugin-vue",
"version": "0.20.5",
"version": "0.21.0",
"description": "Cloudflight eslint-plugin & eslint-config for vue",
"volta": {
"extends": "../../package.json"
Expand Down

0 comments on commit 3a942ee

Please sign in to comment.