Skip to content

Commit

Permalink
Merge pull request #48 from phanect/noconflict-typescript
Browse files Browse the repository at this point in the history
Add @typescript-eslint rules to noconflict config
  • Loading branch information
phanect committed Oct 17, 2021
2 parents 169c324 + bf6d6ec commit c4dd362
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,16 @@ Or you can extend `plugin:editorconfig/all` instead of adding rules.
Following rules may conflict `editorconfig/*` rule.
It is recommended to disable them.

- eol-last
- indent
- linebreak-style
- no-trailing-spaces
- unicode-bom
- `eol-last`
- `indent`
- `linebreak-style`
- `no-trailing-spaces`
- `unicode-bom`
- `@typescript-eslint/eol-last`
- `@typescript-eslint/indent`
- `@typescript-eslint/linebreak-style`
- `@typescript-eslint/no-trailing-spaces`
- `@typescript-eslint/unicode-bom`

If above rules are specified in your .eslintrc, just remove them.
If they are specified in the extended config, consider adding `plugin:editorconfig/noconflict` to your `extends`.
Expand Down
10 changes: 10 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ module.exports = {
"linebreak-style": "off",
"no-trailing-spaces": "off",
"unicode-bom": "off",
"@typescript-eslint/eol-last": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/linebreak-style": "off",
"@typescript-eslint/no-trailing-spaces": "off",
"@typescript-eslint/unicode-bom": "off",
},
},
all: {
Expand All @@ -25,6 +30,11 @@ module.exports = {
"linebreak-style": "off",
"no-trailing-spaces": "off",
"unicode-bom": "off",
"@typescript-eslint/eol-last": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/linebreak-style": "off",
"@typescript-eslint/no-trailing-spaces": "off",
"@typescript-eslint/unicode-bom": "off",

"editorconfig/charset": "error",
"editorconfig/eol-last": "error",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-editorconfig",
"version": "3.1.0",
"version": "3.2.0",
"description": "An ESLint plugin to enforce EditorConfig rules",
"main": "main.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions test-packages/base-rules-conflict/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

module.exports = {
root: true,
extends: "plugin:editorconfig/noconflict",

env: {
es6: true,
Expand Down
1 change: 1 addition & 0 deletions test-packages/js/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

module.exports = {
root: true,
extends: "plugin:editorconfig/noconflict",

env: {
es6: true,
Expand Down
1 change: 1 addition & 0 deletions test-packages/ts/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

module.exports = {
root: true,
extends: "plugin:editorconfig/noconflict",

env: {
es6: true,
Expand Down

0 comments on commit c4dd362

Please sign in to comment.