@robinblomberg/eslint-config-robinblomberg 0.7.1 → 0.7.5

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.
Files changed (2) hide show
  1. package/index.js +16 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -3,6 +3,8 @@ const error = 'error';
3
3
  const off = 'off';
4
4
  const warn = IS_DEVELOPMENT ? 'warn' : 'error';
5
5
 
6
+ const camelCasePrefixes = ['I', 'T'];
7
+
6
8
  // eslint-disable-next-line import/no-commonjs
7
9
  module.exports = {
8
10
  env: {
@@ -195,12 +197,14 @@ module.exports = {
195
197
  '@typescript-eslint/naming-convention': [
196
198
  warn,
197
199
  {
198
- format: ['camelCase'],
200
+ format: ['strictCamelCase'],
199
201
  leadingUnderscore: 'allow',
202
+ prefix: camelCasePrefixes,
200
203
  selector: 'default',
201
204
  },
202
205
  {
203
- format: ['PascalCase'],
206
+ format: ['StrictPascalCase'],
207
+ prefix: camelCasePrefixes,
204
208
  selector: [
205
209
  'class',
206
210
  'enum',
@@ -210,12 +214,19 @@ module.exports = {
210
214
  ],
211
215
  },
212
216
  {
213
- format: ['camelCase', 'PascalCase'],
217
+ format: ['strictCamelCase', 'StrictPascalCase'],
218
+ prefix: camelCasePrefixes,
214
219
  selector: ['function'],
215
220
  },
216
221
  {
217
- format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
222
+ format: ['strictCamelCase', 'UPPER_CASE'],
223
+ prefix: camelCasePrefixes,
224
+ selector: ['objectLiteralMethod', 'objectLiteralProperty'],
225
+ },
226
+ {
227
+ format: ['strictCamelCase', 'StrictPascalCase', 'UPPER_CASE'],
218
228
  leadingUnderscore: 'allow',
229
+ prefix: camelCasePrefixes,
219
230
  selector: ['variable'],
220
231
  },
221
232
  {
@@ -787,7 +798,7 @@ module.exports = {
787
798
  'handle-callback-err': [warn, '^(err|error)$'],
788
799
  'id-blacklist': warn,
789
800
  'id-length': off,
790
- 'id-match': [warn, '^[$_]?[_A-Za-z][A-Za-z0-9_]*$'],
801
+ 'id-match': [warn, '^[$_]$|^[$_]?[_A-Za-z][A-Za-z0-9_]*$'],
791
802
  'implicit-arrow-linebreak': [off, 'beside'],
792
803
  'import/default': warn,
793
804
  'import/dynamic-import-chunkname': off,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinblomberg/eslint-config-robinblomberg",
3
- "version": "0.7.1",
3
+ "version": "0.7.5",
4
4
  "author": "Robin Blomberg",
5
5
  "main": "index.js",
6
6
  "repository": {