@softwareventures/eslint-config 4.1.0 → 4.3.2

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/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { Linter } from "eslint";
1
+ import type { Linter } from "eslint";
2
2
  declare const config: Linter.Config;
3
3
  export = config;
package/index.js CHANGED
@@ -24,6 +24,7 @@ const config = {
24
24
  },
25
25
  rules: {
26
26
  "dot-notation": "off",
27
+ "no-unused-expressions": "off",
27
28
  "sonarjs/prefer-while": "error",
28
29
  "@typescript-eslint/array-type": [
29
30
  "error",
@@ -89,19 +90,6 @@ const config = {
89
90
  }
90
91
  ],
91
92
  "@typescript-eslint/interface-name-prefix": "off",
92
- "@typescript-eslint/member-delimiter-style": [
93
- "error",
94
- {
95
- multiline: {
96
- delimiter: "semi",
97
- requireLast: true
98
- },
99
- singleline: {
100
- delimiter: "semi",
101
- requireLast: false
102
- }
103
- }
104
- ],
105
93
  "@typescript-eslint/member-ordering": "error",
106
94
  "@typescript-eslint/no-empty-function": "off",
107
95
  "@typescript-eslint/no-explicit-any": "off",
@@ -111,6 +99,7 @@ const config = {
111
99
  "@typescript-eslint/no-unsafe-assignment": "off",
112
100
  "@typescript-eslint/no-unsafe-member-access": "off",
113
101
  "@typescript-eslint/no-unsafe-return": "off",
102
+ "@typescript-eslint/no-unused-expressions": "error",
114
103
  "@typescript-eslint/no-unused-vars": "off",
115
104
  "@typescript-eslint/no-useless-constructor": "error",
116
105
  "@typescript-eslint/no-use-before-define": "off",
@@ -161,9 +150,6 @@ const config = {
161
150
  ],
162
151
  rules: {
163
152
  "arrow-body-style": "error",
164
- "arrow-parens": ["off", "always"],
165
- "brace-style": ["error", "1tbs"],
166
- "comma-dangle": "error",
167
153
  "complexity": "off",
168
154
  "curly": "error",
169
155
  "dot-notation": "error",
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":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AC1C,gBAAgB,EAAE,OAAO;QACzB,sBAAsB,EAAE,KAAK;QAC7B,YAAY,EAAE,OAAO;QACrB,WAAW,EAAE,OAAO;QACpB,sBAAsB,EAAE,OAAO;QAC/B,UAAU,EAAE,KAAK;QACjB,mBAAmB,EAAE,KAAK;QAC1B,SAAS,EAAE,OAAO;QAClB,eAAe,EAAE,OAAO;QACxB,yBAAyB,EAAE,OAAO;QAClC,aAAa,EAAE,OAAO;QACtB,iBAAiB,EAAE,OAAO;QAC1B,UAAU,EAAE,OAAO;QACnB,uBAAuB,EAAE;YACrB,OAAO;YACP;gBACI,QAAQ,EAAE;oBACN,iCAAiC;oBACjC,+BAA+B;oBAC/B,6BAA6B;iBAChC;aACJ;SACJ;QACD,iBAAiB,EAAE,OAAO;QAC1B,eAAe,EAAE,OAAO;QACxB,iBAAiB,EAAE,OAAO;QAC1B,kBAAkB,EAAE,OAAO;QAC3B,eAAe,EAAE,OAAO;QACxB,sBAAsB,EAAE,OAAO;QAC/B,uBAAuB,EAAE,OAAO;QAChC,kBAAkB,EAAE,OAAO;QAC3B,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;QAC7B,qCAAqC,EAAE,CAAC,OAAO,EAAE,EAAC,2BAA2B,EAAE,IAAI,EAAC,CAAC;QACrF,sBAAsB,EAAE,OAAO;QAC/B,OAAO,EAAE,OAAO;KACnB;CACJ,CAAC;AAEF,iBAAS,MAAM,CAAC","sourcesContent":["import {Linter} from \"eslint\";\n\nconst config: Linter.Config = {\n env: {\n es6: true,\n node: true\n },\n extends: [\"eslint:recommended\", \"prettier\"],\n plugins: [\"@typescript-eslint\", \"import\", \"jsdoc\", \"prefer-arrow\", \"sonarjs\"],\n parserOptions: {\n ecmaVersion: 2018,\n sourceType: \"module\"\n },\n overrides: [\n {\n files: [\"*.ts\", \"*.tsx\"],\n extends: [\n \"plugin:@typescript-eslint/eslint-recommended\",\n \"plugin:@typescript-eslint/recommended\",\n \"plugin:@typescript-eslint/recommended-requiring-type-checking\"\n ],\n parser: \"@typescript-eslint/parser\",\n parserOptions: {\n project: \"tsconfig.json\"\n },\n rules: {\n \"dot-notation\": \"off\",\n \"sonarjs/prefer-while\": \"error\",\n \"@typescript-eslint/array-type\": [\n \"error\",\n {\n default: \"array-simple\"\n }\n ],\n \"@typescript-eslint/ban-types\": [\n \"error\",\n {\n types: {\n Object: {\n message: [\n 'Do not use the `Object` type, it means \"any non-nullish value\".',\n '- If you want a type meaning \"any object\", you probably want `Record<string, unknown>` or `object` instead.',\n '- If you want a type meaning \"any value\", you probably want `unknown` or `any` instead.'\n ].join(\"\\n\"),\n fixWith: \"object\"\n },\n Function: {\n message: [\n \"The `Function` type accepts any function-like value.\",\n \"It provides no type safety when calling the function, which can be a common source of bugs.\",\n \"It also accepts things like class declarations, which will throw at runtime as they may not be called with `new`.\",\n \"If you are expecting a function to accept certain arguments, you should explicitly define the function shape.\"\n ].join(\"\\n\"),\n fixWith: \"() => void\"\n },\n Boolean: {\n message: \"Use boolean instead\",\n fixWith: \"boolean\"\n },\n Number: {\n message: \"Use number instead\",\n fixWith: \"number\"\n },\n String: {\n message: \"Use string instead\",\n fixWith: \"string\"\n },\n Symbol: {\n message: \"Use symbol instead\",\n fixWith: \"symbol\"\n }\n },\n extendDefaults: false\n }\n ],\n \"@typescript-eslint/ban-ts-comment\": \"error\",\n \"@typescript-eslint/class-literal-property-style\": \"error\",\n \"@typescript-eslint/dot-notation\": \"error\",\n \"@typescript-eslint/explicit-function-return-type\": [\n \"error\",\n {\n allowExpressions: true,\n allowTypedFunctionExpressions: true\n }\n ],\n \"@typescript-eslint/explicit-member-accessibility\": [\n \"error\",\n {\n accessibility: \"explicit\"\n }\n ],\n \"@typescript-eslint/interface-name-prefix\": \"off\",\n \"@typescript-eslint/member-delimiter-style\": [\n \"error\",\n {\n multiline: {\n delimiter: \"semi\",\n requireLast: true\n },\n singleline: {\n delimiter: \"semi\",\n requireLast: false\n }\n }\n ],\n \"@typescript-eslint/member-ordering\": \"error\",\n \"@typescript-eslint/no-empty-function\": \"off\",\n \"@typescript-eslint/no-explicit-any\": \"off\",\n \"@typescript-eslint/no-extraneous-class\": \"error\",\n \"@typescript-eslint/no-floating-promises\": \"error\",\n \"@typescript-eslint/no-unnecessary-boolean-literal-compare\": \"error\",\n \"@typescript-eslint/no-unsafe-assignment\": \"off\",\n \"@typescript-eslint/no-unsafe-member-access\": \"off\",\n \"@typescript-eslint/no-unsafe-return\": \"off\",\n \"@typescript-eslint/no-unused-vars\": \"off\",\n \"@typescript-eslint/no-useless-constructor\": \"error\",\n \"@typescript-eslint/no-use-before-define\": \"off\",\n \"@typescript-eslint/prefer-for-of\": \"off\",\n \"@typescript-eslint/prefer-function-type\": \"error\",\n \"@typescript-eslint/prefer-regexp-exec\": \"off\",\n \"@typescript-eslint/promise-function-async\": \"error\",\n \"@typescript-eslint/restrict-template-expressions\": [\n \"error\",\n {\n allowNumber: true,\n allowBoolean: true,\n allowAny: false,\n allowNullish: false\n }\n ],\n \"@typescript-eslint/require-await\": \"off\",\n \"@typescript-eslint/triple-slash-reference\": [\n \"error\",\n {\n path: \"always\",\n types: \"prefer-import\",\n lib: \"always\"\n }\n ],\n \"@typescript-eslint/unified-signatures\": \"error\"\n }\n },\n {\n files: [\n \"test.ts\",\n \"test.tsx\",\n \"*.test.ts\",\n \"*.test.tsx\",\n \"*.test-d.ts\",\n \"*.test-d.tsx\"\n ],\n parserOptions: {\n project: \"tsconfig.test.json\"\n }\n },\n {\n files: [\"test.{js,jsx,ts,tsx}\", \"*.test.{js,jsx,ts,tsx}\", \"*.config.{js,jsx,ts,tsx}\"],\n rules: {\n \"no-restricted-imports\": \"off\"\n }\n }\n ],\n rules: {\n \"arrow-body-style\": \"error\",\n \"arrow-parens\": [\"off\", \"always\"],\n \"brace-style\": [\"error\", \"1tbs\"],\n \"comma-dangle\": \"error\",\n \"complexity\": \"off\",\n \"curly\": \"error\",\n \"dot-notation\": \"error\",\n \"eqeqeq\": [\"error\", \"always\", {null: \"never\"}],\n \"guard-for-in\": \"error\",\n \"id-blacklist\": \"error\",\n \"id-match\": \"error\",\n \"import/no-extraneous-dependencies\": [\n \"error\",\n {\n devDependencies: [\n \"**/*.config.{js,jsx,ts,tsx}\",\n \"**/*.test.{js,jsx,ts,tsx}\",\n \"**/*.test-d.{ts,tsx}\",\n \"**/test.{js,jsx,ts,tsx}\"\n ],\n optionalDependencies: false\n }\n ],\n \"import/order\": \"error\",\n \"jsdoc/check-alignment\": \"error\",\n \"jsdoc/check-indentation\": \"off\",\n \"jsdoc/newline-after-description\": \"error\",\n \"jsdoc/no-types\": \"error\",\n \"max-classes-per-file\": \"off\",\n \"new-parens\": \"error\",\n \"no-caller\": \"error\",\n \"no-duplicate-imports\": \"error\",\n \"no-empty\": \"off\",\n \"no-empty-function\": \"off\",\n \"no-eval\": \"error\",\n \"no-extra-bind\": \"error\",\n \"no-irregular-whitespace\": \"error\",\n \"no-new-func\": \"error\",\n \"no-new-wrappers\": \"error\",\n \"no-proto\": \"error\",\n \"no-restricted-imports\": [\n \"error\",\n {\n patterns: [\n \"**/*.config{,.js,.jsx,.ts,.tsx}\",\n \"**/*.test{,.js,.jsx,.ts,.tsx}\",\n \"**/test{,.js,.jsx,.ts,.tsx}\"\n ]\n }\n ],\n \"no-return-await\": \"error\",\n \"no-script-url\": \"error\",\n \"no-self-compare\": \"error\",\n \"no-throw-literal\": \"error\",\n \"no-undef-init\": \"error\",\n \"no-underscore-dangle\": \"error\",\n \"no-unused-expressions\": \"error\",\n \"object-shorthand\": \"error\",\n \"one-var\": [\"error\", \"never\"],\n \"prefer-arrow/prefer-arrow-functions\": [\"error\", {allowStandaloneDeclarations: true}],\n \"prefer-object-spread\": \"error\",\n \"radix\": \"error\"\n }\n};\n\nexport = config;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAEA,MAAM,MAAM,GAAkB;IAC1B,GAAG,EAAE;QACD,GAAG,EAAE,IAAI;QACT,IAAI,E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,OAAO;YACP;gBACI,QAAQ,EAAE;oBACN,iCAAiC;oBACjC,+BAA+B;oBAC/B,6BAA6B;iBAChC;aACJ;SACJ;QACD,iBAAiB,EAAE,OAAO;QAC1B,eAAe,EAAE,OAAO;QACxB,iBAAiB,EAAE,OAAO;QAC1B,kBAAkB,EAAE,OAAO;QAC3B,eAAe,EAAE,OAAO;QACxB,sBAAsB,EAAE,OAAO;QAC/B,uBAAuB,EAAE,OAAO;QAChC,kBAAkB,EAAE,OAAO;QAC3B,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;QAC7B,qCAAqC,EAAE,CAAC,OAAO,EAAE,EAAC,2BAA2B,EAAE,IAAI,EAAC,CAAC;QACrF,sBAAsB,EAAE,OAAO;QAC/B,OAAO,EAAE,OAAO;KACnB;CACJ,CAAC;AAEF,iBAAS,MAAM,CAAC","sourcesContent":["import type {Linter} from \"eslint\";\n\nconst config: Linter.Config = {\n env: {\n es6: true,\n node: true\n },\n extends: [\"eslint:recommended\", \"prettier\"],\n plugins: [\"@typescript-eslint\", \"import\", \"jsdoc\", \"prefer-arrow\", \"sonarjs\"],\n parserOptions: {\n ecmaVersion: 2018,\n sourceType: \"module\"\n },\n overrides: [\n {\n files: [\"*.ts\", \"*.tsx\"],\n extends: [\n \"plugin:@typescript-eslint/eslint-recommended\",\n \"plugin:@typescript-eslint/recommended\",\n \"plugin:@typescript-eslint/recommended-requiring-type-checking\"\n ],\n parser: \"@typescript-eslint/parser\",\n parserOptions: {\n project: \"tsconfig.json\"\n },\n rules: {\n \"dot-notation\": \"off\",\n \"no-unused-expressions\": \"off\",\n \"sonarjs/prefer-while\": \"error\",\n \"@typescript-eslint/array-type\": [\n \"error\",\n {\n default: \"array-simple\"\n }\n ],\n \"@typescript-eslint/ban-types\": [\n \"error\",\n {\n types: {\n Object: {\n message: [\n 'Do not use the `Object` type, it means \"any non-nullish value\".',\n '- If you want a type meaning \"any object\", you probably want `Record<string, unknown>` or `object` instead.',\n '- If you want a type meaning \"any value\", you probably want `unknown` or `any` instead.'\n ].join(\"\\n\"),\n fixWith: \"object\"\n },\n Function: {\n message: [\n \"The `Function` type accepts any function-like value.\",\n \"It provides no type safety when calling the function, which can be a common source of bugs.\",\n \"It also accepts things like class declarations, which will throw at runtime as they may not be called with `new`.\",\n \"If you are expecting a function to accept certain arguments, you should explicitly define the function shape.\"\n ].join(\"\\n\"),\n fixWith: \"() => void\"\n },\n Boolean: {\n message: \"Use boolean instead\",\n fixWith: \"boolean\"\n },\n Number: {\n message: \"Use number instead\",\n fixWith: \"number\"\n },\n String: {\n message: \"Use string instead\",\n fixWith: \"string\"\n },\n Symbol: {\n message: \"Use symbol instead\",\n fixWith: \"symbol\"\n }\n },\n extendDefaults: false\n }\n ],\n \"@typescript-eslint/ban-ts-comment\": \"error\",\n \"@typescript-eslint/class-literal-property-style\": \"error\",\n \"@typescript-eslint/dot-notation\": \"error\",\n \"@typescript-eslint/explicit-function-return-type\": [\n \"error\",\n {\n allowExpressions: true,\n allowTypedFunctionExpressions: true\n }\n ],\n \"@typescript-eslint/explicit-member-accessibility\": [\n \"error\",\n {\n accessibility: \"explicit\"\n }\n ],\n \"@typescript-eslint/interface-name-prefix\": \"off\",\n \"@typescript-eslint/member-ordering\": \"error\",\n \"@typescript-eslint/no-empty-function\": \"off\",\n \"@typescript-eslint/no-explicit-any\": \"off\",\n \"@typescript-eslint/no-extraneous-class\": \"error\",\n \"@typescript-eslint/no-floating-promises\": \"error\",\n \"@typescript-eslint/no-unnecessary-boolean-literal-compare\": \"error\",\n \"@typescript-eslint/no-unsafe-assignment\": \"off\",\n \"@typescript-eslint/no-unsafe-member-access\": \"off\",\n \"@typescript-eslint/no-unsafe-return\": \"off\",\n \"@typescript-eslint/no-unused-expressions\": \"error\",\n \"@typescript-eslint/no-unused-vars\": \"off\",\n \"@typescript-eslint/no-useless-constructor\": \"error\",\n \"@typescript-eslint/no-use-before-define\": \"off\",\n \"@typescript-eslint/prefer-for-of\": \"off\",\n \"@typescript-eslint/prefer-function-type\": \"error\",\n \"@typescript-eslint/prefer-regexp-exec\": \"off\",\n \"@typescript-eslint/promise-function-async\": \"error\",\n \"@typescript-eslint/restrict-template-expressions\": [\n \"error\",\n {\n allowNumber: true,\n allowBoolean: true,\n allowAny: false,\n allowNullish: false\n }\n ],\n \"@typescript-eslint/require-await\": \"off\",\n \"@typescript-eslint/triple-slash-reference\": [\n \"error\",\n {\n path: \"always\",\n types: \"prefer-import\",\n lib: \"always\"\n }\n ],\n \"@typescript-eslint/unified-signatures\": \"error\"\n }\n },\n {\n files: [\n \"test.ts\",\n \"test.tsx\",\n \"*.test.ts\",\n \"*.test.tsx\",\n \"*.test-d.ts\",\n \"*.test-d.tsx\"\n ],\n parserOptions: {\n project: \"tsconfig.test.json\"\n }\n },\n {\n files: [\"test.{js,jsx,ts,tsx}\", \"*.test.{js,jsx,ts,tsx}\", \"*.config.{js,jsx,ts,tsx}\"],\n rules: {\n \"no-restricted-imports\": \"off\"\n }\n }\n ],\n rules: {\n \"arrow-body-style\": \"error\",\n \"complexity\": \"off\",\n \"curly\": \"error\",\n \"dot-notation\": \"error\",\n \"eqeqeq\": [\"error\", \"always\", {null: \"never\"}],\n \"guard-for-in\": \"error\",\n \"id-blacklist\": \"error\",\n \"id-match\": \"error\",\n \"import/no-extraneous-dependencies\": [\n \"error\",\n {\n devDependencies: [\n \"**/*.config.{js,jsx,ts,tsx}\",\n \"**/*.test.{js,jsx,ts,tsx}\",\n \"**/*.test-d.{ts,tsx}\",\n \"**/test.{js,jsx,ts,tsx}\"\n ],\n optionalDependencies: false\n }\n ],\n \"import/order\": \"error\",\n \"jsdoc/check-alignment\": \"error\",\n \"jsdoc/check-indentation\": \"off\",\n \"jsdoc/newline-after-description\": \"error\",\n \"jsdoc/no-types\": \"error\",\n \"max-classes-per-file\": \"off\",\n \"new-parens\": \"error\",\n \"no-caller\": \"error\",\n \"no-duplicate-imports\": \"error\",\n \"no-empty\": \"off\",\n \"no-empty-function\": \"off\",\n \"no-eval\": \"error\",\n \"no-extra-bind\": \"error\",\n \"no-irregular-whitespace\": \"error\",\n \"no-new-func\": \"error\",\n \"no-new-wrappers\": \"error\",\n \"no-proto\": \"error\",\n \"no-restricted-imports\": [\n \"error\",\n {\n patterns: [\n \"**/*.config{,.js,.jsx,.ts,.tsx}\",\n \"**/*.test{,.js,.jsx,.ts,.tsx}\",\n \"**/test{,.js,.jsx,.ts,.tsx}\"\n ]\n }\n ],\n \"no-return-await\": \"error\",\n \"no-script-url\": \"error\",\n \"no-self-compare\": \"error\",\n \"no-throw-literal\": \"error\",\n \"no-undef-init\": \"error\",\n \"no-underscore-dangle\": \"error\",\n \"no-unused-expressions\": \"error\",\n \"object-shorthand\": \"error\",\n \"one-var\": [\"error\", \"never\"],\n \"prefer-arrow/prefer-arrow-functions\": [\"error\", {allowStandaloneDeclarations: true}],\n \"prefer-object-spread\": \"error\",\n \"radix\": \"error\"\n }\n};\n\nexport = config;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softwareventures/eslint-config",
3
- "version": "4.1.0",
3
+ "version": "4.3.2",
4
4
  "description": "Standard eslint configuration for Software Ventures Limited",
5
5
  "keywords": [
6
6
  "TypeScript",
@@ -29,7 +29,7 @@
29
29
  "eslint-plugin-import": "^2.20.2",
30
30
  "eslint-plugin-jsdoc": "^36.0.0",
31
31
  "eslint-plugin-prefer-arrow": "^1.2.1",
32
- "eslint-plugin-sonarjs": "^0.10.0",
32
+ "eslint-plugin-sonarjs": "^0.10.0 || ^0.11.0",
33
33
  "tslib": "^2.0.0"
34
34
  },
35
35
  "peerDependencies": {
@@ -37,17 +37,17 @@
37
37
  "typescript": "^3.8.3 || ^4.0.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@softwareventures/prettier-config": "1.0.2",
40
+ "@softwareventures/prettier-config": "2.0.0",
41
41
  "@softwareventures/semantic-release-config": "2.0.0",
42
42
  "@softwareventures/tsconfig": "5.1.0",
43
- "@types/eslint": "7.28.0",
43
+ "@types/eslint": "7.29.0",
44
44
  "ava": "3.15.0",
45
45
  "cz-conventional-changelog": "3.3.0",
46
46
  "eslint": "7.32.0",
47
- "prettier": "2.3.2",
47
+ "prettier": "2.5.1",
48
48
  "semantic-release": "17.4.7",
49
- "ts-node": "10.2.1",
50
- "typescript": "4.4.2"
49
+ "ts-node": "10.4.0",
50
+ "typescript": "4.5.3"
51
51
  },
52
52
  "eslintConfig": {
53
53
  "root": true,