eslint-config-gristow 2.0.9 → 2.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/rules/shared-rules.cjs +8 -3
- package/test.ts +7 -0
package/package.json
CHANGED
package/rules/shared-rules.cjs
CHANGED
|
@@ -11,6 +11,10 @@ module.exports = {
|
|
|
11
11
|
'default-param-last': 'off',
|
|
12
12
|
'@typescript-eslint/default-param-last': 'error',
|
|
13
13
|
|
|
14
|
+
// Note: you must disable the base rule as it can report incorrect errors
|
|
15
|
+
'no-empty-function': 'off',
|
|
16
|
+
'@typescript-eslint/no-empty-function': 'error',
|
|
17
|
+
|
|
14
18
|
'no-unreachable': 'error',
|
|
15
19
|
'no-use-before-define': ['error', { functions: false }],
|
|
16
20
|
// '@-define': ['error', { functions: false }],
|
|
@@ -141,10 +145,11 @@ module.exports = {
|
|
|
141
145
|
// often require these.
|
|
142
146
|
{
|
|
143
147
|
selector: 'objectLiteralProperty',
|
|
144
|
-
|
|
145
|
-
regex: '[a-zA-Z]+(_[a-zA-Z\\d]+)
|
|
148
|
+
filter: {
|
|
149
|
+
regex: '^[a-zA-Z]+(_[a-zA-Z\\d]+)*$',
|
|
150
|
+
match: true,
|
|
146
151
|
},
|
|
147
|
-
format:
|
|
152
|
+
format: null,
|
|
148
153
|
},
|
|
149
154
|
// Make sure types and interfaces are in PascalCase. (Also applies
|
|
150
155
|
// to classes.)
|
package/test.ts
CHANGED
|
@@ -4,6 +4,13 @@ import { greet, snake_case_import } from './test-ts-export';
|
|
|
4
4
|
greetJS('Johnny', 'Appleseed');
|
|
5
5
|
greet('Jenny', 'Applesseed');
|
|
6
6
|
|
|
7
|
+
const a = {
|
|
8
|
+
this_pRop_is_ok: 3,
|
|
9
|
+
_this_prop_is_not: 4,
|
|
10
|
+
neither__is_this_one: 5,
|
|
11
|
+
};
|
|
12
|
+
console.log(a);
|
|
13
|
+
|
|
7
14
|
export function completeName(fullName);
|
|
8
15
|
export function completeName(firstName, lastName?) {
|
|
9
16
|
// Should show error, unused variable...
|