-
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(eslint, prettier): Update eslint and prettier configurations (#69)
### Prettier - Convert configuration to JSON - Turn off semicolons - Use tabs instead of spaces for indentation ### Eslint - Use standard-with-typescript instead of xo - Remove custom rule definitions - Remove dependency on eslint-plugin-prettier
- Loading branch information
Showing
10 changed files
with
296 additions
and
458 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@jarsec/prettier-config': patch | ||
--- | ||
|
||
Remove space indentation setting |
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 @@ | ||
--- | ||
"@jarsec/prettier-config": major | ||
--- | ||
|
||
- Convert configuration file to JSON | ||
- No semicolons allowed | ||
- Use tabs instead of spaces for indentation |
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,8 @@ | ||
--- | ||
'@jarsec/eslint-config': major | ||
--- | ||
|
||
- Remove xo and xo-typescript configurations | ||
- Add standard-with-typescript configuration | ||
- Remove eslint-plugin-prettier, let Prettier handle formatting in a separate step | ||
- Remove custom TypeScript 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 |
---|---|---|
@@ -1,57 +1,36 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
/* eslint-disable @typescript-eslint/no-require-imports */ | ||
/* eslint-disable @typescript-eslint/no-unsafe-call */ | ||
|
||
require("@rushstack/eslint-patch/modern-module-resolution"); | ||
|
||
const rules = { | ||
"comma-dangle": "off", | ||
"import/first": "error", | ||
"import/newline-after-import": "error", | ||
"import/no-duplicates": "error", | ||
"no-mixed-spaces-and-tabs": "off", | ||
"no-warning-comments": "off", | ||
"object-curly-spacing": "off", | ||
"operator-linebreak": "off", | ||
}; | ||
require('@rushstack/eslint-patch/modern-module-resolution') | ||
|
||
module.exports = { | ||
env: { | ||
node: true, | ||
}, | ||
extends: [ | ||
"xo", | ||
"xo-typescript", | ||
"plugin:perfectionist/recommended-natural", | ||
"plugin:prettier/recommended", | ||
], | ||
overrides: [ | ||
{ | ||
files: ["**/*/*.{test,spec}.ts"], | ||
rules: { | ||
...rules, | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
"@typescript-eslint/no-unsafe-call": "off", | ||
"@typescript-eslint/no-unsafe-member-access": "off", | ||
"@typescript-eslint/unbound-method": "off", | ||
}, | ||
}, | ||
], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: "./tsconfig.json", | ||
}, | ||
plugins: [ | ||
"@typescript-eslint/eslint-plugin", | ||
"import", | ||
"perfectionist", | ||
"prettier", | ||
], | ||
rules, | ||
settings: { | ||
"import/resolver": { | ||
node: true, | ||
typescript: true, | ||
}, | ||
}, | ||
}; | ||
env: { | ||
node: true | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/stylistic', | ||
'plugin:perfectionist/recommended-natural', | ||
'prettier' | ||
], | ||
overrides: [ | ||
{ | ||
files: ['**/*/*.{test,spec}.ts'], | ||
rules: { | ||
'@typescript-eslint/no-unsafe-assignment': 'off', | ||
'@typescript-eslint/no-unsafe-call': 'off', | ||
'@typescript-eslint/no-unsafe-member-access': 'off', | ||
'@typescript-eslint/unbound-method': 'off' | ||
} | ||
} | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: './tsconfig.json' | ||
}, | ||
plugins: ['import', 'perfectionist', '@typescript-eslint/eslint-plugin'], | ||
settings: { | ||
'import/resolver': { | ||
node: true, | ||
typescript: true | ||
} | ||
} | ||
} |
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 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,11 @@ | ||
{ | ||
"singleQuote": true, | ||
"semi": false, | ||
"arrowParens": "avoid", | ||
"trailingComma": "none", | ||
"bracketSpacing": true, | ||
"endOfLine": "auto", | ||
"printWidth": 100, | ||
"tabWidth": 2, | ||
"useTabs": true | ||
} |
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
Oops, something went wrong.