@nihalgonsalves/esconfig 0.7.1 → 0.8.1

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.js CHANGED
@@ -2,18 +2,18 @@
2
2
 
3
3
  /** @type import('eslint-define-config').ESLintConfig */
4
4
  module.exports = {
5
- parser: '@typescript-eslint/parser',
6
- plugins: ['@typescript-eslint', 'import'],
5
+ parser: "@typescript-eslint/parser",
6
+ plugins: ["@typescript-eslint", "import"],
7
7
  parserOptions: {
8
- project: './**/tsconfig*.json',
8
+ project: "./**/tsconfig*.json",
9
9
  warnOnUnsupportedTypeScriptVersion: false,
10
10
  },
11
11
  extends: [
12
- 'eslint:recommended',
13
- 'airbnb-typescript/base',
14
- 'plugin:@typescript-eslint/strict-type-checked',
15
- 'plugin:import/typescript',
16
- 'prettier',
12
+ "eslint:recommended",
13
+ "airbnb-typescript/base",
14
+ "plugin:@typescript-eslint/strict-type-checked",
15
+ "plugin:import/typescript",
16
+ "prettier",
17
17
  ],
18
- rules: require('./eslint-rules-base'),
18
+ rules: require("./eslint-rules-base"),
19
19
  };
@@ -2,36 +2,36 @@
2
2
 
3
3
  /** @type import('eslint-define-config').ESLintConfig */
4
4
  module.exports = {
5
- parser: '@typescript-eslint/parser',
6
- plugins: ['@typescript-eslint', 'import', 'react'],
5
+ parser: "@typescript-eslint/parser",
6
+ plugins: ["@typescript-eslint", "import", "react"],
7
7
  parserOptions: {
8
- project: './**/tsconfig*.json',
8
+ project: "./**/tsconfig*.json",
9
9
  warnOnUnsupportedTypeScriptVersion: false,
10
10
  },
11
11
  settings: {
12
- react: { version: 'detect' },
12
+ react: { version: "detect" },
13
13
  },
14
14
  extends: [
15
- 'eslint:recommended',
16
- 'airbnb-typescript',
17
- 'airbnb/hooks',
18
- 'plugin:react/recommended',
19
- 'plugin:@typescript-eslint/strict-type-checked',
20
- 'plugin:import/typescript',
21
- 'prettier',
15
+ "eslint:recommended",
16
+ "airbnb-typescript",
17
+ "airbnb/hooks",
18
+ "plugin:react/recommended",
19
+ "plugin:@typescript-eslint/strict-type-checked",
20
+ "plugin:import/typescript",
21
+ "prettier",
22
22
  ],
23
23
  rules: {
24
- ...require('./eslint-rules-base'),
25
- 'react/state-in-constructor': ['error', 'never'],
26
- 'react/static-property-placement': ['error', 'static public field'],
27
- 'react/react-in-jsx-scope': 'off',
24
+ ...require("./eslint-rules-base"),
25
+ "react/state-in-constructor": ["error", "never"],
26
+ "react/static-property-placement": ["error", "static public field"],
27
+ "react/react-in-jsx-scope": "off",
28
28
  // Not a problem with TypeScript
29
- 'react/jsx-props-no-spreading': 'off',
30
- 'react/require-default-props': 'off',
31
- 'react/jsx-no-useless-fragment': ['error', { allowExpressions: true }],
32
- 'react/no-array-index-key': 'error',
33
- 'react/jsx-key': [
34
- 'error',
29
+ "react/jsx-props-no-spreading": "off",
30
+ "react/require-default-props": "off",
31
+ "react/jsx-no-useless-fragment": ["error", { allowExpressions: true }],
32
+ "react/no-array-index-key": "error",
33
+ "react/jsx-key": [
34
+ "error",
35
35
  {
36
36
  checkFragmentShorthand: true,
37
37
  checkKeyMustBeforeSpread: true,
package/.prettierrc.js CHANGED
@@ -1,3 +1,4 @@
1
- module.exports = {
2
- singleQuote: true,
3
- };
1
+ // @ts-check
2
+
3
+ /** @type{import('prettier').Config} */
4
+ module.exports = {};
@@ -3,69 +3,69 @@
3
3
 
4
4
  /** @type import('eslint-define-config').Rules */
5
5
  module.exports = {
6
- 'import/prefer-default-export': 'off',
7
- 'import/no-default-export': 'error',
8
- 'import/order': [
9
- 'error',
6
+ "import/prefer-default-export": "off",
7
+ "import/no-default-export": "error",
8
+ "import/order": [
9
+ "error",
10
10
  {
11
11
  pathGroups: [
12
12
  {
13
- pattern: '@nihalgonsalves/**',
14
- group: 'internal',
15
- position: 'after',
13
+ pattern: "@nihalgonsalves/**",
14
+ group: "internal",
15
+ position: "after",
16
16
  },
17
17
  ],
18
- pathGroupsExcludedImportTypes: ['builtin'],
18
+ pathGroupsExcludedImportTypes: ["builtin"],
19
19
  groups: [
20
- 'builtin',
21
- 'external',
22
- 'internal',
23
- 'unknown',
24
- 'parent',
25
- 'sibling',
26
- 'index',
20
+ "builtin",
21
+ "external",
22
+ "internal",
23
+ "unknown",
24
+ "parent",
25
+ "sibling",
26
+ "index",
27
27
  ],
28
- 'newlines-between': 'always',
29
- alphabetize: { order: 'asc' },
28
+ "newlines-between": "always",
29
+ alphabetize: { order: "asc" },
30
30
  },
31
31
  ],
32
- 'func-style': ['error', 'expression'],
33
- 'arrow-body-style': 'error',
34
- 'object-shorthand': 'error',
35
- 'no-useless-rename': 'error',
36
- '@typescript-eslint/no-unused-vars': [
37
- 'error',
38
- { ignoreRestSiblings: true, argsIgnorePattern: '^_' },
32
+ "func-style": ["error", "expression"],
33
+ "arrow-body-style": "error",
34
+ "object-shorthand": "error",
35
+ "no-useless-rename": "error",
36
+ "@typescript-eslint/no-unused-vars": [
37
+ "error",
38
+ { ignoreRestSiblings: true, argsIgnorePattern: "^_" },
39
39
  ],
40
- '@typescript-eslint/consistent-type-imports': [
41
- 'error',
42
- { fixStyle: 'inline-type-imports' },
40
+ "@typescript-eslint/consistent-type-imports": [
41
+ "error",
42
+ { fixStyle: "inline-type-imports" },
43
43
  ],
44
- '@typescript-eslint/consistent-type-definitions': ['error', 'type'],
45
- '@typescript-eslint/ban-ts-comment': [
46
- 'error',
44
+ "@typescript-eslint/consistent-type-definitions": ["error", "type"],
45
+ "@typescript-eslint/ban-ts-comment": [
46
+ "error",
47
47
  {
48
- 'ts-expect-error': 'allow-with-description',
49
- 'ts-ignore': true,
50
- 'ts-nocheck': true,
51
- 'ts-check': false,
48
+ "ts-expect-error": "allow-with-description",
49
+ "ts-ignore": true,
50
+ "ts-nocheck": true,
51
+ "ts-check": false,
52
52
  },
53
53
  ],
54
- '@typescript-eslint/consistent-type-assertions': [
55
- 'error',
54
+ "@typescript-eslint/consistent-type-assertions": [
55
+ "error",
56
56
  {
57
- assertionStyle: 'never',
57
+ assertionStyle: "never",
58
58
  },
59
59
  ],
60
- '@typescript-eslint/strict-boolean-expressions': [
61
- 'error',
60
+ "@typescript-eslint/strict-boolean-expressions": [
61
+ "error",
62
62
  { allowNullableBoolean: true, allowNullableString: true },
63
63
  ],
64
- '@typescript-eslint/prefer-regexp-exec': 'error',
65
- '@typescript-eslint/promise-function-async': 'error',
66
- '@typescript-eslint/method-signature-style': 'error',
67
- '@typescript-eslint/naming-convention': 'error',
68
- '@typescript-eslint/no-import-type-side-effects': 'error',
69
- '@typescript-eslint/require-array-sort-compare': 'error',
70
- '@typescript-eslint/switch-exhaustiveness-check': 'error',
64
+ "@typescript-eslint/prefer-regexp-exec": "error",
65
+ "@typescript-eslint/promise-function-async": "error",
66
+ "@typescript-eslint/method-signature-style": "error",
67
+ "@typescript-eslint/naming-convention": "error",
68
+ "@typescript-eslint/no-import-type-side-effects": "error",
69
+ "@typescript-eslint/require-array-sort-compare": "error",
70
+ "@typescript-eslint/switch-exhaustiveness-check": "error",
71
71
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nihalgonsalves/esconfig",
3
- "version": "0.7.1",
3
+ "version": "0.8.1",
4
4
  "description": "Shared ECMAScript Config (TS, Lint, Prettier)",
5
5
  "main": "index.js",
6
6
  "repository": "git@github.com:nihalgonsalves/esconfig.git",
@@ -21,8 +21,8 @@
21
21
  "prepare": "husky install"
22
22
  },
23
23
  "dependencies": {
24
- "@typescript-eslint/eslint-plugin": "^6.17.0",
25
- "@typescript-eslint/parser": "^6.17.0",
24
+ "@typescript-eslint/eslint-plugin": "^6.18.1",
25
+ "@typescript-eslint/parser": "^6.18.1",
26
26
  "eslint-config-airbnb-typescript": "^17.1.0",
27
27
  "eslint-config-prettier": "^9.0.0",
28
28
  "eslint-plugin-import": "^2.29.1",
@@ -31,18 +31,18 @@
31
31
  "eslint-plugin-react-hooks": "^4.6.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@commitlint/cli": "^18.0.0",
35
- "@commitlint/config-conventional": "^18.0.0",
34
+ "@commitlint/cli": "^18.4.4",
35
+ "@commitlint/config-conventional": "^18.4.4",
36
36
  "eslint": "^8.56.0",
37
37
  "eslint-define-config": "^2.1.0",
38
38
  "husky": "^8.0.3",
39
- "lefthook": "^1.4.8",
40
- "prettier": "^3.0.0",
39
+ "lefthook": "^1.5.6",
40
+ "prettier": "^3.2.2",
41
41
  "typescript": "^5.1.6"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "eslint": "^8.44.0",
45
- "prettier": "^3.0.0",
45
+ "prettier": "^3.2.2",
46
46
  "typescript": "^5.1.3"
47
47
  },
48
48
  "packageManager": "yarn@4.0.2+sha256.825003a0f561ad09a3b1ac4a3b3ea6207af2796d54f62a9420520915721f5186"
package/tsconfig.json CHANGED
@@ -1,10 +1,16 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "incremental": true,
4
3
  "target": "es2022",
5
4
  "module": "es2022",
5
+ "moduleResolution": "Bundler",
6
+ "moduleDetection": "force",
7
+
8
+ "types": [],
9
+
6
10
  "sourceMap": true,
7
11
  "strict": true,
12
+ "incremental": true,
13
+
8
14
  "noFallthroughCasesInSwitch": true,
9
15
  "noImplicitOverride": true,
10
16
  "noImplicitReturns": true,
@@ -13,9 +19,10 @@
13
19
  "noUnusedLocals": true,
14
20
  "noUnusedParameters": true,
15
21
  "exactOptionalPropertyTypes": true,
16
- "moduleResolution": "node",
17
22
  "allowSyntheticDefaultImports": true,
18
23
  "esModuleInterop": true,
19
- "forceConsistentCasingInFileNames": true
24
+
25
+ "forceConsistentCasingInFileNames": true,
26
+ "verbatimModuleSyntax": true
20
27
  }
21
28
  }