@enormora/eslint-config-base 0.0.24 → 0.0.25

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/base.js +15 -1
  2. package/package.json +1 -1
package/base.js CHANGED
@@ -111,7 +111,21 @@ export const baseConfig = {
111
111
  'no-prototype-builtins': 'error',
112
112
  'no-redeclare': ['error', { builtinGlobals: true }],
113
113
  'no-regex-spaces': 'error',
114
- 'no-restricted-syntax': 'off',
114
+ 'no-restricted-syntax': [
115
+ 'error',
116
+ {
117
+ selector: 'TSEnumDeclaration',
118
+ message: 'Use a string union type instead'
119
+ },
120
+ {
121
+ selector: 'ClassDeclaration[superClass.name!=/Error$/]',
122
+ message: 'Class declarations are not allowed except for extending errors.'
123
+ },
124
+ {
125
+ selector: 'SwitchStatement',
126
+ message: 'Use pattern matching instead.'
127
+ }
128
+ ],
115
129
  'no-return-assign': ['error', 'always'],
116
130
  'no-self-assign': ['error', { props: true }],
117
131
  'no-self-compare': 'error',
package/package.json CHANGED
@@ -25,5 +25,5 @@
25
25
  "url": "git://github.com/enormora/eslint-config.git"
26
26
  },
27
27
  "type": "module",
28
- "version": "0.0.24"
28
+ "version": "0.0.25"
29
29
  }