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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-gristow",
3
- "version": "2.0.9",
3
+ "version": "2.0.11",
4
4
  "description": "Eslint settings for Greg Ristow",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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
- custom: {
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: ['camelCase', 'strictCamelCase', 'PascalCase', 'snake_case', 'UPPER_CASE'],
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...