Skip to content

Commit a59386b

Browse files
committed
💥 update dependencies and configs
1 parent 4c288e0 commit a59386b

22 files changed

+126
-97
lines changed

‎.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
sudo: false
2-
31
language: node_js
42
node_js:
5-
- "6.5.0"
63
- "8"
74
- "10"
5+
- "12"
86

97
after_success:
108
- npm run codecov

‎lib/configs/+eslint-plugin.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ module.exports = {
1515
// Enabled rules
1616
"@mysticatea/eslint-plugin/consistent-output": "error",
1717
"@mysticatea/eslint-plugin/fixer-return": "error",
18+
"@mysticatea/eslint-plugin/meta-property-ordering": [
19+
"error",
20+
[
21+
"deprecated",
22+
"docs",
23+
"fixable",
24+
"messages",
25+
"replacedBy",
26+
"schema",
27+
"type",
28+
],
29+
],
1830
"@mysticatea/eslint-plugin/no-deprecated-context-methods":
1931
"error",
2032
"@mysticatea/eslint-plugin/no-deprecated-report-api": "error",
@@ -35,8 +47,20 @@ module.exports = {
3547
],
3648
"@mysticatea/eslint-plugin/require-meta-fixable": "error",
3749
"@mysticatea/eslint-plugin/require-meta-type": "error",
38-
"@mysticatea/eslint-plugin/test-case-property-ordering":
50+
"@mysticatea/eslint-plugin/test-case-property-ordering": [
3951
"error",
52+
[
53+
"filename",
54+
"code",
55+
"output",
56+
"options",
57+
"parser",
58+
"parserOptions",
59+
"globals",
60+
"env",
61+
"errors",
62+
],
63+
],
4064
"@mysticatea/eslint-plugin/test-case-shorthand-strings":
4165
"error",
4266
},

‎lib/configs/+modules.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ module.exports = {
1010
},
1111
rules: {
1212
"@mysticatea/node/no-extraneous-import": "error",
13+
"@mysticatea/node/file-extension-in-import": [
14+
"error",
15+
"always",
16+
{ ".js": "never", ".ts": "never", ".tsx": "never" },
17+
],
1318
"@mysticatea/node/no-missing-import": "error",
1419
"@mysticatea/node/no-unpublished-import": "error",
1520
},

‎lib/configs/+node.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ module.exports = {
3333
"@mysticatea/node/prefer-global/text-encoder": "off",
3434
"@mysticatea/node/prefer-global/url-search-params": "off",
3535
"@mysticatea/node/prefer-global/url": "off",
36+
"@mysticatea/node/prefer-promises/dns": "off",
37+
"@mysticatea/node/prefer-promises/fs": "off",
3638
"@mysticatea/node/process-exit-as-throw": "error",
3739
"@mysticatea/node/shebang": "error",
3840
},

‎lib/configs/_ts.js

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ module.exports = {
2929
"@mysticatea/ts/no-array-constructor": "error",
3030
"@mysticatea/ts/no-empty-interface": "error",
3131
"@mysticatea/ts/no-extraneous-class": "error",
32+
"@mysticatea/ts/no-floating-promises": "error",
3233
"@mysticatea/ts/no-for-in-array": "error",
3334
"@mysticatea/ts/no-inferrable-types": "error",
3435
"@mysticatea/ts/no-misused-new": "error",
@@ -41,20 +42,18 @@ module.exports = {
4142
],
4243
"@mysticatea/ts/no-triple-slash-reference": "error",
4344
"@mysticatea/ts/no-unnecessary-qualifier": "error",
44-
// https://github.com/typescript-eslint/typescript-eslint/issues/453
45-
"@mysticatea/ts/no-unnecessary-type-assertion": "off",
46-
"@mysticatea/ts/no-useless-constructor": "error",
45+
"@mysticatea/ts/no-unnecessary-type-assertion": "error",
4746
"@mysticatea/ts/no-var-requires": "error",
4847
// https://github.com/typescript-eslint/typescript-eslint/issues/454
4948
"@mysticatea/ts/prefer-function-type": "off",
5049
"@mysticatea/ts/prefer-includes": "error",
5150
"@mysticatea/ts/prefer-namespace-keyword": "error",
51+
"@mysticatea/ts/prefer-regexp-exec": "error",
5252
"@mysticatea/ts/prefer-string-starts-ends-with": "error",
5353
"@mysticatea/ts/restrict-plus-operands": "error",
5454
"@mysticatea/ts/require-array-sort-compare": "error",
5555
"@mysticatea/ts/unbound-method": [
56-
// https://github.com/typescript-eslint/typescript-eslint/issues/451
57-
"off",
56+
"error",
5857
{ ignoreStatic: true },
5958
],
6059
// https://github.com/typescript-eslint/typescript-eslint/issues/452
@@ -72,6 +71,14 @@ module.exports = {
7271
},
7372
],
7473

74+
// Replacements
75+
camelcase: "off",
76+
"@mysticatea/ts/camelcase": "error",
77+
"no-empty-function": "off",
78+
"@mysticatea/ts/no-empty-function": "error",
79+
"no-useless-constructor": "off",
80+
"@mysticatea/ts/no-useless-constructor": "error",
81+
7582
// Disabled rules
7683
"func-style": "off",
7784
"init-declarations": "off",
@@ -85,22 +92,24 @@ module.exports = {
8592
"no-use-before-define": "off",
8693
"one-var": "off",
8794
"@mysticatea/ts/ban-types": "off",
88-
"@mysticatea/ts/camelcase": "off", // ?
95+
"@mysticatea/ts/consistent-type-definitions": "off",
8996
"@mysticatea/ts/explicit-function-return-type": "off", // I want but this is not so...
97+
"@mysticatea/ts/func-call-spacing": "off", // favor of Prettier.
9098
"@mysticatea/ts/generic-type-naming": "off",
9199
"@mysticatea/ts/indent": "off", // favor of Prettier.
92100
"@mysticatea/ts/member-delimiter-style": "off", // favor of Prettier.
93101
"@mysticatea/ts/member-ordering": "off",
94102
"@mysticatea/ts/no-explicit-any": "off",
95103
"@mysticatea/ts/no-extra-parens": "off", // favor of Prettier.
104+
"@mysticatea/ts/no-magic-numbers": "off",
96105
"@mysticatea/ts/no-namespace": "off", // I like the namespace for interfaces (type only things).
97106
"@mysticatea/ts/no-non-null-assertion": "off",
98107
"@mysticatea/ts/no-type-alias": "off",
99108
"@mysticatea/ts/no-unused-vars": "off", // tsc verifies it.
100109
"@mysticatea/ts/no-use-before-define": "off", // tsc verifies it.
101110
"@mysticatea/ts/prefer-for-of": "off",
102-
"@mysticatea/ts/prefer-interface": "off",
103111
"@mysticatea/ts/promise-function-async": "off",
112+
"@mysticatea/ts/semi": "off", // favor of Prettier.
104113
"@mysticatea/ts/type-annotation-spacing": "off", // favor of Prettier.
105114
},
106115
settings: {

‎lib/rules/arrow-parens.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ function isSameLine(a, b) {
2626

2727
module.exports = {
2828
meta: {
29-
type: "suggestion",
3029
docs: {
3130
description: "enforce the parentheses style of arrow functions.",
3231
category: "Stylistic Issues",
@@ -36,6 +35,7 @@ module.exports = {
3635
},
3736
fixable: "code",
3837
schema: [],
38+
type: "suggestion",
3939
},
4040
create(context) {
4141
return {

‎lib/rules/block-scoped-var.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ class PseudoScope {
192192

193193
module.exports = {
194194
meta: {
195-
type: "suggestion",
196195
docs: {
197196
description: "disallow illegal usage of variables as block-scoped.",
198197
category: "Possible Errors",
@@ -202,6 +201,7 @@ module.exports = {
202201
},
203202
fixable: null,
204203
schema: [],
204+
type: "suggestion",
205205
},
206206
create(context) {
207207
/**

‎lib/rules/no-instanceof-array.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
module.exports = {
1313
meta: {
14-
type: "problem",
1514
docs: {
1615
description: "disallow 'instanceof' for Array",
1716
category: "Best Practices",
@@ -20,6 +19,7 @@ module.exports = {
2019
},
2120
fixable: "code",
2221
schema: [],
22+
type: "problem",
2323
},
2424

2525
create(context) {

‎lib/rules/no-instanceof-wrapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
module.exports = {
1313
meta: {
14-
type: "problem",
1514
docs: {
1615
description: "disallow 'instanceof' for wrapper objects",
1716
category: "Best Practices",
@@ -20,6 +19,7 @@ module.exports = {
2019
},
2120
fixable: "code",
2221
schema: [],
22+
type: "problem",
2323
},
2424

2525
create(context) {

‎lib/rules/no-literal-call.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ const LITERAL_AND_CLASS_TYPE = /^(?:(?:Array|Class|Object)Expression|(?:Template
1717

1818
module.exports = {
1919
meta: {
20-
type: "problem",
2120
docs: {
2221
description: "Disallow a call of a literal.",
2322
category: "Possible Errors",
@@ -27,6 +26,7 @@ module.exports = {
2726
},
2827
fixable: null,
2928
schema: [],
29+
type: "problem",
3030
},
3131

3232
create(context) {

0 commit comments

Comments
 (0)