Skip to content

Commit 8170793

Browse files
afonsojramosJosh Goldberg
authored and
Josh Goldberg
committed
use of no-empty-function (#210)
* use of no-empty-function * sorted by name
1 parent 1d899c8 commit 8170793

File tree

12 files changed

+17
-17
lines changed

12 files changed

+17
-17
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ module.exports = {
2323
"@typescript-eslint/generic-type-naming": 0,
2424
"@typescript-eslint/indent": 0,
2525
"@typescript-eslint/member-ordering": 0,
26+
"@typescript-eslint/no-empty-function": 0,
2627
"@typescript-eslint/no-explicit-any": 0,
2728
"@typescript-eslint/no-extra-parens": 0,
2829
"@typescript-eslint/no-magic-numbers": 0,
@@ -47,7 +48,6 @@ module.exports = {
4748
"import/prefer-default-export": 0,
4849
"no-console": 0,
4950
"no-continue": 0,
50-
"no-empty-function": 0,
5151
"no-restricted-syntax": 0,
5252
"no-param-reassign": 0,
5353
"no-return-await": 0,

src/rules/converters/no-empty.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const convertNoEmptyRule = (tslintRule: RuleConverterOptions) => {
2525
const convertNoEmptyFunctionRule = (tslintRule: RuleConverterOptions) => {
2626
return !tslintRule.ruleArguments.includes("allow-empty-functions")
2727
? {
28-
ruleName: "no-empty-functions",
28+
ruleName: "@typescript-eslint/no-empty-function",
2929
}
3030
: undefined;
3131
};

src/rules/converters/tests/no-empty.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe(convertNoEmpty, () => {
1212
ruleName: "no-empty",
1313
},
1414
{
15-
ruleName: "no-empty-functions",
15+
ruleName: "@typescript-eslint/no-empty-function",
1616
},
1717
],
1818
});
@@ -30,7 +30,7 @@ describe(convertNoEmpty, () => {
3030
ruleName: "no-empty",
3131
},
3232
{
33-
ruleName: "no-empty-functions",
33+
ruleName: "@typescript-eslint/no-empty-function",
3434
},
3535
],
3636
});

test/tests/custom eslint path/eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module.exports = {
99
"@typescript-eslint/array-type": "error",
1010
"@typescript-eslint/interface-name-prefix": "error",
1111
"@typescript-eslint/member-ordering": "off",
12+
"@typescript-eslint/no-empty-function": "off",
1213
"@typescript-eslint/no-explicit-any": "off",
1314
"@typescript-eslint/no-param-reassign": "off",
1415
"@typescript-eslint/no-parameter-properties": "off",
@@ -20,7 +21,6 @@ module.exports = {
2021
"linebreak-style": "off",
2122
"no-bitwise": "off",
2223
"no-empty": "off",
23-
"no-empty-functions": "off",
2424
"no-magic-numbers": "off",
2525
"padding-line-between-statements": [
2626
"off",

test/tests/custom eslint path/expected.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module.exports = {
99
"@typescript-eslint/array-type": "error",
1010
"@typescript-eslint/interface-name-prefix": "error",
1111
"@typescript-eslint/member-ordering": "off",
12+
"@typescript-eslint/no-empty-function": "off",
1213
"@typescript-eslint/no-explicit-any": "off",
1314
"@typescript-eslint/no-param-reassign": "off",
1415
"@typescript-eslint/no-parameter-properties": "off",
@@ -20,7 +21,6 @@ module.exports = {
2021
"linebreak-style": "off",
2122
"no-bitwise": "off",
2223
"no-empty": "off",
23-
"no-empty-functions": "off",
2424
"no-magic-numbers": "off",
2525
"padding-line-between-statements": [
2626
"off",

test/tests/custom package path/eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module.exports = {
1717
"@typescript-eslint/array-type": "error",
1818
"@typescript-eslint/interface-name-prefix": "error",
1919
"@typescript-eslint/member-ordering": "off",
20+
"@typescript-eslint/no-empty-function": "off",
2021
"@typescript-eslint/no-explicit-any": "off",
2122
"@typescript-eslint/no-param-reassign": "off",
2223
"@typescript-eslint/no-parameter-properties": "off",
@@ -28,7 +29,6 @@ module.exports = {
2829
"linebreak-style": "off",
2930
"no-bitwise": "off",
3031
"no-empty": "off",
31-
"no-empty-functions": "off",
3232
"no-magic-numbers": "off",
3333
"padding-line-between-statements": [
3434
"off",

test/tests/custom typescript path/eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ module.exports = {
1616
"@typescript-eslint/array-type": "error",
1717
"@typescript-eslint/interface-name-prefix": "error",
1818
"@typescript-eslint/member-ordering": "off",
19+
"@typescript-eslint/no-empty-function": "off",
1920
"@typescript-eslint/no-explicit-any": "off",
2021
"@typescript-eslint/no-param-reassign": "off",
2122
"@typescript-eslint/no-parameter-properties": "off",
@@ -27,7 +28,6 @@ module.exports = {
2728
"linebreak-style": "off",
2829
"no-bitwise": "off",
2930
"no-empty": "off",
30-
"no-empty-functions": "off",
3131
"no-magic-numbers": "off",
3232
"padding-line-between-statements": [
3333
"off",

test/tests/missing tslint.json/.eslintrc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@typescript-eslint/array-type": "error",
1717
"@typescript-eslint/interface-name-prefix": "error",
1818
"@typescript-eslint/member-ordering": "off",
19+
"@typescript-eslint/no-empty-function": "off",
1920
"@typescript-eslint/no-explicit-any": "off",
2021
"@typescript-eslint/no-param-reassign": "off",
2122
"@typescript-eslint/no-parameter-properties": "off",
@@ -27,7 +28,6 @@
2728
"linebreak-style": "off",
2829
"no-bitwise": "off",
2930
"no-empty": "off",
30-
"no-empty-functions": "off",
3131
"no-magic-numbers": "off",
3232
"prefer-template": "off",
3333
"@typescript-eslint/tslint/config": [
@@ -47,4 +47,4 @@
4747
}
4848
]
4949
}
50-
}
50+
}

test/tests/missing tslint.json/expected.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@typescript-eslint/array-type": "error",
1717
"@typescript-eslint/interface-name-prefix": "error",
1818
"@typescript-eslint/member-ordering": "off",
19+
"@typescript-eslint/no-empty-function": "off",
1920
"@typescript-eslint/no-explicit-any": "off",
2021
"@typescript-eslint/no-param-reassign": "off",
2122
"@typescript-eslint/no-parameter-properties": "off",
@@ -27,7 +28,6 @@
2728
"linebreak-style": "off",
2829
"no-bitwise": "off",
2930
"no-empty": "off",
30-
"no-empty-functions": "off",
3131
"no-magic-numbers": "off",
3232
"prefer-template": "off",
3333
"@typescript-eslint/tslint/config": [
@@ -47,4 +47,4 @@
4747
}
4848
]
4949
}
50-
}
50+
}

test/tests/standalone tslint.json/.eslintrc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@typescript-eslint/array-type": "error",
1717
"@typescript-eslint/interface-name-prefix": "error",
1818
"@typescript-eslint/member-ordering": "off",
19+
"@typescript-eslint/no-empty-function": "off",
1920
"@typescript-eslint/no-explicit-any": "off",
2021
"@typescript-eslint/no-param-reassign": "off",
2122
"@typescript-eslint/no-parameter-properties": "off",
@@ -27,7 +28,6 @@
2728
"linebreak-style": "off",
2829
"no-bitwise": "off",
2930
"no-empty": "off",
30-
"no-empty-functions": "off",
3131
"no-magic-numbers": "off",
3232
"prefer-template": "off",
3333
"@typescript-eslint/tslint/config": [
@@ -47,4 +47,4 @@
4747
}
4848
]
4949
}
50-
}
50+
}

test/tests/standalone tslint.json/eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module.exports = {
1717
"@typescript-eslint/array-type": "error",
1818
"@typescript-eslint/interface-name-prefix": "error",
1919
"@typescript-eslint/member-ordering": "off",
20+
"@typescript-eslint/no-empty-function": "off",
2021
"@typescript-eslint/no-explicit-any": "off",
2122
"@typescript-eslint/no-param-reassign": "off",
2223
"@typescript-eslint/no-parameter-properties": "off",
@@ -28,7 +29,6 @@ module.exports = {
2829
"linebreak-style": "off",
2930
"no-bitwise": "off",
3031
"no-empty": "off",
31-
"no-empty-functions": "off",
3232
"no-magic-numbers": "off",
3333
"padding-line-between-statements": [
3434
"off",

test/tests/standalone tslint.json/expected.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@typescript-eslint/array-type": "error",
1717
"@typescript-eslint/interface-name-prefix": "error",
1818
"@typescript-eslint/member-ordering": "off",
19+
"@typescript-eslint/no-empty-function": "off",
1920
"@typescript-eslint/no-explicit-any": "off",
2021
"@typescript-eslint/no-param-reassign": "off",
2122
"@typescript-eslint/no-parameter-properties": "off",
@@ -27,7 +28,6 @@
2728
"linebreak-style": "off",
2829
"no-bitwise": "off",
2930
"no-empty": "off",
30-
"no-empty-functions": "off",
3131
"no-magic-numbers": "off",
3232
"prefer-template": "off",
3333
"@typescript-eslint/tslint/config": [
@@ -47,4 +47,4 @@
4747
}
4848
]
4949
}
50-
}
50+
}

0 commit comments

Comments
 (0)