eslint-config-gristow 2.0.13 → 2.0.14

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/.eslintrc.cjs CHANGED
@@ -26,7 +26,7 @@ module.exports = {
26
26
  },
27
27
  rules: {
28
28
  ...rules,
29
- ...importRules
29
+ ...importRules,
30
30
  },
31
31
  env: {
32
32
  browser: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-gristow",
3
- "version": "2.0.13",
3
+ "version": "2.0.14",
4
4
  "description": "Eslint settings for Greg Ristow",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,4 +1,6 @@
1
1
  module.exports = {
2
+ 'no-duplicate-imports': 'off',
3
+ 'import/no-duplicates': ['error', { 'prefer-inline': false }],
2
4
  'import/no-deprecated': 'warn',
3
5
  'import/export': 'error',
4
6
  'import/no-empty-named-blocks': 'error',
@@ -26,7 +28,6 @@ module.exports = {
26
28
  'import/no-nodejs-modules': 'off',
27
29
  'import/first': 'off',
28
30
  'import/imports-first': 'off',
29
- 'import/no-duplicates': 'off',
30
31
  'import/no-namespace': 'off',
31
32
  'import/extensions': 'off',
32
33
  'import/prefer-default-export': 'off',
@@ -56,7 +56,7 @@ module.exports = {
56
56
  // our interaction with external libraries where options objects
57
57
  // often require these.
58
58
  {
59
- selector: 'objectLiteralProperty',
59
+ selector: ['objectLiteralProperty', 'objectLiteralMethod', 'parameterProperty'],
60
60
  filter: {
61
61
  regex: '^[a-zA-Z]+(_[a-zA-Z\\d]+)*$',
62
62
  match: true,
@@ -20,7 +20,6 @@ module.exports = {
20
20
  'no-unreachable': 'error',
21
21
  'no-use-before-define': ['error', { functions: false }],
22
22
  // '@-define': ['error', { functions: false }],
23
- 'no-duplicate-imports': 'error',
24
23
  'no-debugger': 'off',
25
24
  'no-restricted-syntax': ['error', 'LabeledStatement', 'WithStatement'],
26
25
  'prefer-arrow-callback': 'off',
package/test-ts-export.ts CHANGED
@@ -2,4 +2,7 @@ export function greet(firstName: string, lastName: string): string {
2
2
  return `${firstName} ${lastName}`;
3
3
  }
4
4
 
5
- export const snake_case_import = 'snake case import';
5
+ export const snake_case_import = 'snake case import';
6
+
7
+ export type Apple = 'apple';
8
+ export const apple: Apple = 'apple';
package/test.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { greetJS } from './test-js-export';
2
- import { greet, snake_case_import } from './test-ts-export';
2
+ import { apple, snake_case_import, greet } from './test-ts-export';
3
+ import type { Apple } from './test-ts-export';
3
4
 
4
5
  greetJS('Johnny', 'Appleseed');
5
6
  greet('Jenny', 'Applesseed');
@@ -49,6 +50,9 @@ const coordinates = {
49
50
 
50
51
  const { x_top } = coordinates;
51
52
 
53
+ const a: Apple = apple;
54
+ console.log(a);
55
+
52
56
  throw 'hello';
53
57
 
54
58
  console.log('unreachable code error!');