@origin-1/eslint-config 0.13.0 → 0.14.0

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/README.md CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  [ESLint](https://eslint.org/) configuration generator with [Origin₁](https://github.com/origin-1) presets.
4
4
 
5
- [npm badge]: https://img.shields.io/npm/v/@origin-1%2Feslint-config.svg?logo=npm
5
+ [npm badge]: https://img.shields.io/npm/v/@origin-1%2Feslint-config?logo=npm
6
6
  [npm url]: https://www.npmjs.com/package/@origin-1/eslint-config
@@ -8,6 +8,7 @@ export interface ConfigData extends Linter.HasRules {
8
8
  parser?: string | undefined;
9
9
  parserOptions?: Linter.ParserOptions | undefined;
10
10
  plugins?: string[] | undefined;
11
+ processor?: string | undefined;
11
12
  tsVersion?: TSVersion | undefined;
12
13
  }
13
14
  export interface ConfigDataWithFiles extends ConfigData {
@@ -23,13 +23,14 @@ function createBaseConfig(configData) {
23
23
  const { env, parser, parserOptions, plugins: overridePlugins, rules: overrideRules } = createBaseOverride(configData);
24
24
  plugins.push(...overridePlugins);
25
25
  Object.assign(rules, overrideRules);
26
- const { extends: extends_, globals } = configData;
26
+ const { extends: extends_, globals, processor } = configData;
27
27
  const baseConfig = {
28
28
  env,
29
29
  extends: extends_,
30
30
  globals,
31
31
  parserOptions,
32
32
  plugins,
33
+ processor,
33
34
  reportUnusedDisableDirectives: true,
34
35
  rules,
35
36
  };
@@ -167,8 +168,8 @@ function createConfig(...configDataList) {
167
168
  exports.createConfig = createConfig;
168
169
  function createOverride(configData) {
169
170
  const baseOverride = createBaseOverride(configData);
170
- const { excludedFiles, extends: extends_, files, globals } = configData;
171
- const override = { ...baseOverride, excludedFiles, extends: extends_, files, globals };
171
+ const { excludedFiles, extends: extends_, files, globals, processor } = configData;
172
+ const override = { ...baseOverride, excludedFiles, extends: extends_, files, globals, processor };
172
173
  return override;
173
174
  }
174
175
  function findRuleEntry(versionedList, jsVersion, tsVersion) {
package/lib/rules.js CHANGED
@@ -291,14 +291,25 @@ exports.RULES = {
291
291
  'indent': 'off',
292
292
  'key-spacing': 'off',
293
293
  'keyword-spacing': ['error'],
294
- 'lines-around-comment': [
294
+ 'lines-around-comment': jsts([
295
295
  'error',
296
296
  {
297
297
  allowBlockStart: true,
298
298
  allowObjectStart: true,
299
299
  applyDefaultIgnorePatterns: false,
300
300
  },
301
- ],
301
+ ], [
302
+ 'error',
303
+ {
304
+ allowBlockStart: true,
305
+ allowEnumStart: true,
306
+ allowInterfaceStart: true,
307
+ allowModuleStart: true,
308
+ allowObjectStart: true,
309
+ allowTypeStart: true,
310
+ applyDefaultIgnorePatterns: false,
311
+ },
312
+ ]),
302
313
  'lines-between-class-members': 'off',
303
314
  'no-extra-parens': ['error'],
304
315
  'object-curly-spacing': ['error', 'always'],
@@ -392,6 +403,7 @@ exports.RULES = {
392
403
  'no-unnecessary-type-arguments': ['error'],
393
404
  'no-unnecessary-type-assertion': ['error'],
394
405
  'no-unnecessary-type-constraint': ['error'],
406
+ 'no-unsafe-enum-comparison': ['error'],
395
407
  'no-useless-empty-export': ['error'],
396
408
  'non-nullable-type-assertion-style': ['error'],
397
409
  'prefer-as-const': ['error'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@origin-1/eslint-config",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "ESLint configuration generator with Origin₁ presets",
5
5
  "homepage": "https://github.com/origin-1/eslint-config#readme",
6
6
  "license": "ISC",
@@ -12,8 +12,8 @@
12
12
  },
13
13
  "peerDependencies": {
14
14
  "@origin-1/eslint-plugin": ">=0.13",
15
- "@typescript-eslint/eslint-plugin": "^5.57",
16
- "@typescript-eslint/parser": "^5.57",
15
+ "@typescript-eslint/eslint-plugin": "^5.58",
16
+ "@typescript-eslint/parser": "^5.58",
17
17
  "eslint": "^8.37",
18
18
  "eslint-plugin-n": "15"
19
19
  },