@studio/eslint-config 7.0.0 → 8.0.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/README.md CHANGED
@@ -5,24 +5,27 @@ The [sharable eslint config][docs] for all JavaScript Studio projects.
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- $ npm install @studio/eslint-config eslint eslint-plugin-mocha eslint-plugin-jsdoc eslint-plugin-node --save-dev
8
+ npm i @studio/eslint-config -D
9
9
  ```
10
10
 
11
11
  ## Usage
12
12
 
13
- Make sure this is in your `package.json`:
13
+ Configure in `eslint.config.js`:
14
14
 
15
- ```json
16
- {
17
- "eslintConfig": {
18
- "extends": "@studio"
15
+ ```js
16
+ import studio_eslint_config from '@studio/eslint-config';
17
+
18
+ export default [
19
+ ...studio_eslint_config,
20
+ {
21
+ /* Project specific overrides */
19
22
  }
20
- }
23
+ ];
21
24
  ```
22
25
 
23
26
  This configuration works great with [`@studio/tsconfig`][tsconfig].
24
27
 
25
- __Pro tip™:__ Check out [eslint_d][] for faster editor integration.
28
+ **Pro tip™:** Check out [eslint_d][] for faster editor integration.
26
29
 
27
30
  ## License
28
31
 
@@ -0,0 +1,59 @@
1
+ /*
2
+ * Copyright (c) Maximilian Antoni <max@javascript.studio>
3
+ *
4
+ * @license MIT
5
+ */
6
+ import js from '@eslint/js';
7
+ import globals from 'globals';
8
+ import plugin_n from 'eslint-plugin-n';
9
+ import plugin_jsdoc from 'eslint-plugin-jsdoc';
10
+ import plugin_mocha from 'eslint-plugin-mocha';
11
+ import rules from './lib/rules.js';
12
+
13
+ export default [
14
+ js.configs.recommended,
15
+ plugin_n.configs['flat/recommended'],
16
+ plugin_jsdoc.configs['flat/recommended'],
17
+ {
18
+ settings: {
19
+ jsdoc: {
20
+ mode: 'typescript',
21
+ preferredTypes: {
22
+ object: 'Object'
23
+ }
24
+ }
25
+ },
26
+
27
+ languageOptions: {
28
+ ecmaVersion: 'latest',
29
+ globals: {
30
+ ...globals.es5,
31
+ ...globals.node
32
+ }
33
+ },
34
+
35
+ rules
36
+ },
37
+ {
38
+ files: ['**/*.test.js', '**/*-test.js', '**/*.integration.js'],
39
+
40
+ plugins: {
41
+ mocha: plugin_mocha
42
+ },
43
+
44
+ languageOptions: {
45
+ globals: {
46
+ ...globals.mocha
47
+ }
48
+ },
49
+
50
+ rules: {
51
+ // https://github.com/lo1tuma/eslint-plugin-mocha
52
+ 'mocha/no-async-describe': 2,
53
+ 'mocha/no-exclusive-tests': 2,
54
+ 'mocha/no-identical-title': 2,
55
+ 'mocha/no-return-and-callback': 2,
56
+ 'mocha/prefer-arrow-callback': 2
57
+ }
58
+ }
59
+ ];
package/lib/rules.js ADDED
@@ -0,0 +1,129 @@
1
+ /*
2
+ * Formatting should be handled by prettier.
3
+ */
4
+ export default {
5
+ // https://github.com/gajus/eslint-plugin-jsdoc
6
+ 'jsdoc/no-undefined-types': 'error',
7
+ 'jsdoc/require-jsdoc': 'off',
8
+ 'jsdoc/require-param-description': 'off',
9
+ 'jsdoc/require-returns-description': 'off',
10
+ 'jsdoc/require-property-description': 'off',
11
+ 'jsdoc/check-indentation': 'warn',
12
+ 'jsdoc/check-line-alignment': 'warn',
13
+ 'jsdoc/require-hyphen-before-param-description': 'warn',
14
+ 'jsdoc/tag-lines': ['warn', 'never', { startLines: 1 }],
15
+
16
+ // https://github.com/eslint-community/eslint-plugin-n
17
+ 'n/handle-callback-err': 2,
18
+ 'n/no-callback-literal': 2,
19
+ 'n/no-new-require': 2,
20
+ 'n/global-require': 2,
21
+ 'n/no-mixed-requires': 2,
22
+ 'n/no-sync': 2,
23
+ 'n/prefer-global/buffer': 2,
24
+ 'n/prefer-global/console': 2,
25
+ 'n/prefer-global/process': 2,
26
+ 'n/prefer-global/text-decoder': 2,
27
+ 'n/prefer-global/text-encoder': 2,
28
+ 'n/prefer-global/url-search-params': 2,
29
+ 'n/prefer-global/url': 2,
30
+ // node default tweaks
31
+ 'n/no-unpublished-require': 0, // fails for @sinonjs/referee-sinon
32
+ 'n/no-unpublished-import': 0, // fails for commander and some @studio projects
33
+ 'n/no-missing-require': [
34
+ 2,
35
+ {
36
+ tryExtensions: ['.js', '.json']
37
+ }
38
+ ],
39
+ 'n/shebang': 0,
40
+ 'no-process-exit': 0,
41
+
42
+ // eslint default tweaks
43
+ 'no-unused-vars': [2, { args: 'after-used', argsIgnorePattern: '^_' }],
44
+
45
+ // Possible Errors (not in recommended)
46
+ 'no-template-curly-in-string': 2,
47
+ 'no-unreachable-loop': 2,
48
+ 'no-useless-backreference': 2,
49
+ 'require-atomic-updates': 2,
50
+
51
+ // Best Practices (not in recommended)
52
+ 'array-callback-return': 2,
53
+ 'block-scoped-var': 2,
54
+ complexity: 2,
55
+ 'consistent-return': 2,
56
+ curly: 2,
57
+ 'default-case': 2,
58
+ 'default-case-last': 2,
59
+ 'default-param-last': 2,
60
+ eqeqeq: 2,
61
+ 'guard-for-in': 2,
62
+ 'no-alert': 2,
63
+ 'no-caller': 2,
64
+ 'no-constructor-return': 2,
65
+ 'no-else-return': 2,
66
+ 'no-eq-null': 2,
67
+ 'no-eval': 2,
68
+ 'no-extend-native': 2,
69
+ 'no-extra-bind': 2,
70
+ 'no-extra-label': 2,
71
+ 'no-floating-decimal': 2,
72
+ 'no-implicit-coercion': 2,
73
+ 'no-implied-eval': 2,
74
+ 'no-iterator': 2,
75
+ 'no-lone-blocks': 2,
76
+ 'no-loop-func': 2,
77
+ 'no-new': 2,
78
+ 'no-new-func': 2,
79
+ 'no-new-wrappers': 2,
80
+ 'no-octal-escape': 2,
81
+ 'no-proto': 2,
82
+ 'no-restricted-properties': 2,
83
+ 'no-return-assign': 2,
84
+ 'no-return-await': 2,
85
+ 'no-self-compare': 2,
86
+ 'no-sequences': 2,
87
+ 'no-throw-literal': 2,
88
+ 'no-unmodified-loop-condition': 2,
89
+ 'no-unused-expressions': 2,
90
+ 'no-useless-call': 2,
91
+ 'no-useless-concat': 2,
92
+ 'no-useless-return': 2,
93
+ 'no-void': 2,
94
+ 'prefer-promise-reject-errors': 2,
95
+ 'prefer-regex-literals': 2,
96
+ radix: 2,
97
+ 'require-await': 2,
98
+ yoda: 2,
99
+ strict: 2,
100
+
101
+ // Variables
102
+ 'no-label-var': 2,
103
+ 'no-restricted-globals': 2,
104
+ 'no-shadow': 2,
105
+ 'no-use-before-define': [2, 'nofunc'],
106
+
107
+ // Stylistic Issues
108
+ 'comma-dangle': 2,
109
+ 'max-depth': 2,
110
+ 'max-nested-callbacks': 2,
111
+ 'new-cap': 2,
112
+ 'new-parens': 2,
113
+ 'no-array-constructor': 2,
114
+ 'no-lonely-if': 2,
115
+ 'no-new-object': 2,
116
+ 'no-unneeded-ternary': 2,
117
+ semi: 2,
118
+
119
+ // ECMAScript 6
120
+ 'no-useless-computed-key': 2,
121
+ 'no-useless-constructor': 2,
122
+ 'no-useless-rename': 2,
123
+ 'no-var': 2,
124
+ 'object-shorthand': 2,
125
+ 'prefer-arrow-callback': 2,
126
+ 'prefer-const': 2,
127
+ 'prefer-spread': 2,
128
+ 'prefer-template': 2
129
+ };
package/package.json CHANGED
@@ -1,29 +1,41 @@
1
1
  {
2
2
  "name": "@studio/eslint-config",
3
- "version": "7.0.0",
3
+ "version": "8.0.1",
4
4
  "description": "The JavaScript Studio sharable eslint config",
5
- "main": "index.js",
5
+ "main": "eslint.config.js",
6
+ "type": "module",
6
7
  "author": "Maximilian Antoni <max@javascript.studio>",
7
8
  "homepage": "https://github.com/javascript-studio/eslint-config",
8
9
  "scripts": {
9
- "test": "eslint --config index.js index.js",
10
+ "test": "eslint *.js",
10
11
  "preversion": "npm test",
11
12
  "version": "changes --commits --footer",
12
13
  "postversion": "git push --follow-tags && npm publish"
13
14
  },
15
+ "dependencies": {
16
+ "@eslint/js": "*",
17
+ "globals": "*"
18
+ },
14
19
  "devDependencies": {
15
- "@studio/changes": "^3.0.0"
20
+ "@studio/changes": "^3.0.0",
21
+ "prettier": "^3.2.5"
16
22
  },
17
23
  "peerDependencies": {
18
- "eslint": "^8",
19
- "eslint-plugin-jsdoc": "^48.5.0",
20
- "eslint-plugin-mocha": "^10.4.3",
21
- "eslint-plugin-n": "^17.9.0",
22
- "jsdoc": "^4.0.3"
24
+ "eslint": "^9",
25
+ "eslint-plugin-jsdoc": "^48",
26
+ "eslint-plugin-mocha": "^10",
27
+ "eslint-plugin-n": "^17",
28
+ "jsdoc": "^4"
23
29
  },
24
30
  "repository": {
25
31
  "type": "git",
26
32
  "url": "https://github.com/javascript-studio/eslint-config.git"
27
33
  },
34
+ "files": [
35
+ "eslint.config.js",
36
+ "lib",
37
+ "LICENSE",
38
+ "README.md"
39
+ ],
28
40
  "license": "MIT"
29
41
  }
package/CHANGES.md DELETED
@@ -1,165 +0,0 @@
1
- # Changes
2
-
3
- ## 7.0.0
4
-
5
- - 🍏 [`1cdcfb1`](https://github.com/javascript-studio/eslint-config/commit/1cdcfb1171c7daf0aecf108bc008562789b30b71)
6
- Update jsdoc
7
- - 🍏 [`3023a23`](https://github.com/javascript-studio/eslint-config/commit/3023a230e191e51730b1a1b1027ff71639a1cb92)
8
- Update eslint-plugin-mocha
9
- - 🍏 [`1899552`](https://github.com/javascript-studio/eslint-config/commit/1899552d102edcba2411ae60b08a59d7d0921b52)
10
- Upgrade eslint-plugin-n
11
- - 🍏 [`5b2cc99`](https://github.com/javascript-studio/eslint-config/commit/5b2cc99c833be3a81f6b5183d945b2d69d5f2f7b)
12
- Upgrade eslint-plugin-jsdoc
13
- - ✨ [`eb10503`](https://github.com/javascript-studio/eslint-config/commit/eb105030f34eb0f6d85921caa88ccb34dc0fc634)
14
- Upgrade Studio Changes
15
- - 🛡️ [`a85468d`](https://github.com/javascript-studio/eslint-config/commit/a85468d7991f665c44a27ad419355d1493124126)
16
- npm audit
17
- - 🛡️ [`fa092b1`](https://github.com/javascript-studio/eslint-config/commit/fa092b1529716ad495aa85626b6c14d448180445)
18
- Bump semver from 7.5.1 to 7.5.3 (dependabot[bot])
19
-
20
- _Released by [Maximilian Antoni](https://github.com/mantoni) on 2024-07-03._
21
-
22
- ## 6.0.0
23
-
24
- - 💄 [`31acb03`](https://github.com/javascript-studio/eslint-config/commit/31acb035ec51089223407fad1823de438ddab2ea)
25
- Require blank line between jsdoc comment and tags
26
- - 🍏 [`d9db688`](https://github.com/javascript-studio/eslint-config/commit/d9db688c7b10fe1e245d38ccc6506bbcaa84457a)
27
- Upgrade eslint-plugin-jsdoc
28
-
29
- _Released by [Maximilian Antoni](https://github.com/mantoni) on 2023-06-24._
30
-
31
- ## 5.0.0
32
-
33
- - 🍏 [`0a58718`](https://github.com/javascript-studio/eslint-config/commit/0a58718ebd1dc186a0282f81999179f3f57dca9a)
34
- Upgrade eslint plugins
35
-
36
- _Released by [Maximilian Antoni](https://github.com/mantoni) on 2023-05-31._
37
-
38
- ## 4.1.0
39
-
40
- - 🍏 [`cb6fd08`](https://github.com/javascript-studio/eslint-config/commit/cb6fd08cd09fc49450a1a67ac417773ca49628f8)
41
- Support eslint-plugin-jsdoc v40
42
-
43
- _Released by [Maximilian Antoni](https://github.com/mantoni) on 2023-03-30._
44
-
45
- ## 4.0.1
46
-
47
- - 🐛 [`e669f78`](https://github.com/javascript-studio/eslint-config/commit/e669f78468a64d40d5cef1fbd717bd5e6824e370)
48
- Fix ecma version setup
49
- - 🐛 [`982a135`](https://github.com/javascript-studio/eslint-config/commit/982a1353b1853010eb5495e56a595cb92c2ff696)
50
- Switch to eslint-plugin-n
51
-
52
- _Released by [Maximilian Antoni](https://github.com/mantoni) on 2023-01-19._
53
-
54
- ## 4.0.0
55
-
56
- - 💥 [`e92eb78`](https://github.com/javascript-studio/eslint-config/commit/e92eb785da9f5b7c3febd8860ffda05c449936e1)
57
- Set env to es2022
58
- - 💥 [`e33122e`](https://github.com/javascript-studio/eslint-config/commit/e33122ede785e5de8d89e6dd192988c174b062da)
59
- Require eslint 8 and jsdoc 4
60
- - ✨ [`3daa57b`](https://github.com/javascript-studio/eslint-config/commit/3daa57bcbf37f8e408beea67e568f42ddf0f10ca)
61
- Reinstall dependencies
62
-
63
- _Released by [Maximilian Antoni](https://github.com/mantoni) on 2023-01-19._
64
-
65
- ## 3.1.0
66
-
67
- - 🍏 [`2125d01`](https://github.com/javascript-studio/eslint-config/commit/2125d01b1d80fdba2309723c1dca980be6a3a774)
68
- Declare compatibility with jsdoc 4
69
- - 🛡️ [`19cb915`](https://github.com/javascript-studio/eslint-config/commit/19cb915a5149802b76cf984190254c2d03bd7a8f)
70
- Bump minimatch from 3.0.4 to 3.1.2 (dependabot[bot])
71
-
72
- _Released by [Maximilian Antoni](https://github.com/mantoni) on 2022-11-17._
73
-
74
- ## 3.0.1
75
-
76
- - 🐛 [`93a45e2`](https://github.com/javascript-studio/eslint-config/commit/93a45e2eb5022e6259daf0cb62905250076fb662)
77
- Add `jsdoc/no-undefined-types`
78
-
79
- _Released by [Maximilian Antoni](https://github.com/mantoni) on 2022-07-26._
80
-
81
- ## 3.0.0
82
-
83
- - 💥 [`6e2362c`](https://github.com/javascript-studio/eslint-config/commit/6e2362c41507b6b1c46f8af026db72d6845f9d87)
84
- Configure JSDoc
85
- - 🛡 [`c62cbcf`](https://github.com/javascript-studio/eslint-config/commit/c62cbcf20738962ca3b1ba98333988fcfae12cb3)
86
- Bump minimist from 1.2.5 to 1.2.6 (dependabot[bot])
87
-
88
- _Released by [Maximilian Antoni](https://github.com/mantoni) on 2022-07-21._
89
-
90
- ## 2.3.0
91
-
92
- - 🍏 [`bed55ec`](https://github.com/javascript-studio/eslint-config/commit/bed55ec462bab33db91990721e69201b00c598b6)
93
- Allow eslint-plugin-mocha ^10
94
- - 🍏 [`361aeee`](https://github.com/javascript-studio/eslint-config/commit/361aeee06d6f2bb3e86fad0c5477a30d21ddb21c)
95
- Support eslint 8
96
- - 🛡 [`28d99ca`](https://github.com/javascript-studio/eslint-config/commit/28d99ca887617c33f82e19370a5904a24f086608)
97
- npm audit
98
- - ✨ [`41e0198`](https://github.com/javascript-studio/eslint-config/commit/41e01980b22034569bac376808a20ba604f4f90b)
99
- Add test script to lint the linter config
100
-
101
- _Released by [Maximilian Antoni](https://github.com/mantoni) on 2022-01-05._
102
-
103
- ## 2.2.0
104
-
105
- - 🍏 [`c4a37e7`](https://github.com/javascript-studio/eslint-config/commit/c4a37e7ed4743d91de1f0fb7386917fa66351b82)
106
- Declare `**/*.integration.js` pattern as mocha env
107
-
108
- _Released by [Maximilian Antoni](https://github.com/mantoni) on 2021-07-27._
109
-
110
- ## 2.1.0
111
-
112
- - 🍏 [`9b034bf`](https://github.com/javascript-studio/eslint-config/commit/9b034bf159367e054c4b44e9987e9fd88b961deb)
113
- Add `eslint-plugin-mocha` v9 compatibility
114
- - 🛡 [`ea0686c`](https://github.com/javascript-studio/eslint-config/commit/ea0686c7948411fb7a14343232eaf886a70b5987)
115
- Bump hosted-git-info from 3.0.4 to 3.0.8 (dependabot[bot])
116
- - 📚 [`c1ed531`](https://github.com/javascript-studio/eslint-config/commit/c1ed531d7b0fa6e309a7f1939ce9ad5ecb3306d5)
117
- Rename project to remove studio prefix
118
- - 📚 [`630b341`](https://github.com/javascript-studio/eslint-config/commit/630b341564b9d16618a6ee55eadea69d251b661b)
119
- Update install instructions
120
- - ✨ [`2b6b0b4`](https://github.com/javascript-studio/eslint-config/commit/2b6b0b4b819b11476f0fc6deb1c8b30a6bb422f1)
121
- Update Studio Changes
122
- - ✨ [`2d3a2b8`](https://github.com/javascript-studio/eslint-config/commit/2d3a2b80c61fd4215cc59931864b7a8e0f789d89)
123
- Use npm 7
124
- - ✨ [`854bcd2`](https://github.com/javascript-studio/eslint-config/commit/854bcd21cad1c25ecea20e95a11bfafaf016e2e9)
125
- Add .gitignore
126
-
127
- _Released by [Maximilian Antoni](https://github.com/mantoni) on 2021-07-08._
128
-
129
- ## 2.0.0
130
-
131
- - [`087bb93`](https://github.com/javascript-studio/eslint-config/commit/087bb9337644a279f6a34d1bb5e513b4fa4dc148)
132
- Rewrite config and dependencies (#7)
133
- >
134
- > - Add node plugin and use recomended settings
135
- > - Drop prettier integration with eslint
136
- > - Rework mocha rules
137
- > - Review all rules
138
- > - Remove formatting related rules to avoid conflicts with prettier
139
-
140
- _Released by [Maximilian Antoni](https://github.com/mantoni) on 2020-11-22._
141
-
142
- ## 1.1.1
143
-
144
- - [`2ec0549`](https://github.com/javascript-studio/eslint-config/commit/2ec0549a3bca5b5d89e9089b440949bcab23af87)
145
- Fix syntax errors (Morgan Roderick)
146
-
147
- ## 1.1.0
148
-
149
- - [`3d0a3bc`](https://github.com/javascript-studio/eslint-config/commit/3d0a3bcdb80bd1fb5652a62cbcd39eea6d801a2c)
150
- Allow early use of functions (Morgan Roderick)
151
-
152
- ## 1.0.2
153
-
154
- - Define indentation rule for wrapped function parameters
155
-
156
- ## 1.0.1
157
-
158
- - Add MIT license
159
- - Add [changes][] to version script for `npm version` releases
160
-
161
- [changes]: https://www.npmjs.com/package/@studio/changes
162
-
163
- ## 1.0.0
164
-
165
- Inception.
package/Session.vim DELETED
@@ -1,56 +0,0 @@
1
- let SessionLoad = 1
2
- if &cp | set nocp | endif
3
- let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1
4
- let v:this_session=expand("<sfile>:p")
5
- silent only
6
- silent tabonly
7
- cd ~/projects/studio/eslint-config
8
- if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
9
- let s:wipebuf = bufnr('%')
10
- endif
11
- let s:shortmess_save = &shortmess
12
- if &shortmess =~ 'A'
13
- set shortmess=aoOA
14
- else
15
- set shortmess=aoO
16
- endif
17
- badd +0 README.md
18
- argglobal
19
- %argdel
20
- edit README.md
21
- argglobal
22
- balt README.md
23
- setlocal fdm=manual
24
- setlocal fde=0
25
- setlocal fmr={{{,}}}
26
- setlocal fdi=#
27
- setlocal fdl=0
28
- setlocal fml=1
29
- setlocal fdn=20
30
- setlocal fen
31
- silent! normal! zE
32
- let &fdl = &fdl
33
- let s:l = 1 - ((0 * winheight(0) + 33) / 67)
34
- if s:l < 1 | let s:l = 1 | endif
35
- keepjumps exe s:l
36
- normal! zt
37
- keepjumps 1
38
- normal! 0
39
- tabnext 1
40
- if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0
41
- silent exe 'bwipe ' . s:wipebuf
42
- endif
43
- unlet! s:wipebuf
44
- set winheight=1 winwidth=20
45
- let &shortmess = s:shortmess_save
46
- let s:sx = expand("<sfile>:p:r")."x.vim"
47
- if filereadable(s:sx)
48
- exe "source " . fnameescape(s:sx)
49
- endif
50
- let &g:so = s:so_save | let &g:siso = s:siso_save
51
- nohlsearch
52
- let g:this_session = v:this_session
53
- let g:this_obsession = v:this_session
54
- doautoall SessionLoadPost
55
- unlet SessionLoad
56
- " vim: set ft=vim :
package/index.js DELETED
@@ -1,183 +0,0 @@
1
- /*
2
- * Copyright (c) Maximilian Antoni <max@javascript.studio>
3
- *
4
- * @license MIT
5
- */
6
- 'use strict';
7
-
8
- module.exports = {
9
-
10
- root: true,
11
-
12
- env: {
13
- node: true,
14
- es6: true
15
- },
16
-
17
- parserOptions: {
18
- ecmaVersion: 2022
19
- },
20
-
21
- plugins: [
22
- 'mocha',
23
- 'jsdoc'
24
- ],
25
-
26
- extends: [
27
- 'eslint:recommended',
28
- 'plugin:n/recommended',
29
- 'plugin:jsdoc/recommended'
30
- ],
31
-
32
- settings: {
33
- jsdoc: {
34
- mode: 'typescript',
35
- preferredTypes: {
36
- object: 'Object'
37
- }
38
- }
39
- },
40
-
41
- overrides: [{
42
- files: [
43
- '**/*.test.js',
44
- '**/*-test.js',
45
- '**/*.integration.js'
46
- ],
47
- env: {
48
- mocha: true
49
- }
50
- }],
51
-
52
- // Formatting should be handled by prettier.
53
- rules: {
54
- // https://github.com/lo1tuma/eslint-plugin-mocha
55
- 'mocha/no-async-describe': 2,
56
- 'mocha/no-exclusive-tests': 2,
57
- 'mocha/no-identical-title': 2,
58
- 'mocha/no-return-and-callback': 2,
59
- 'mocha/prefer-arrow-callback': 2,
60
-
61
- // https://github.com/gajus/eslint-plugin-jsdoc
62
- 'jsdoc/no-undefined-types': 'error',
63
- 'jsdoc/require-jsdoc': 'off',
64
- 'jsdoc/require-param-description': 'off',
65
- 'jsdoc/require-returns-description': 'off',
66
- 'jsdoc/require-property-description': 'off',
67
- 'jsdoc/check-indentation': 'warn',
68
- 'jsdoc/check-line-alignment': 'warn',
69
- 'jsdoc/require-hyphen-before-param-description': 'warn',
70
- 'jsdoc/tag-lines': ['warn', 'never', { 'startLines': 1 }],
71
-
72
- // https://github.com/eslint-community/eslint-plugin-n
73
- 'n/handle-callback-err': 2,
74
- 'n/no-callback-literal': 2,
75
- 'n/no-new-require': 2,
76
- 'n/global-require': 2,
77
- 'n/no-mixed-requires': 2,
78
- 'n/no-sync': 2,
79
- 'n/prefer-global/buffer': 2,
80
- 'n/prefer-global/console': 2,
81
- 'n/prefer-global/process': 2,
82
- 'n/prefer-global/text-decoder': 2,
83
- 'n/prefer-global/text-encoder': 2,
84
- 'n/prefer-global/url-search-params': 2,
85
- 'n/prefer-global/url': 2,
86
- // node default tweaks
87
- 'n/no-unpublished-require': 0, // fails for @sinonjs/referee-sinon
88
- 'n/no-unpublished-import': 0, // fails for commander and some @studio projects
89
- 'n/no-missing-require': [2, {
90
- 'tryExtensions': ['.js', '.json']
91
- }],
92
- 'n/shebang': 0,
93
- 'no-process-exit': 0,
94
-
95
- // eslint default tweaks
96
- 'no-unused-vars': [2, { args: 'after-used', argsIgnorePattern: '^_' }],
97
-
98
- // Possible Errors (not in recommended)
99
- 'no-template-curly-in-string': 2,
100
- 'no-unreachable-loop': 2,
101
- 'no-useless-backreference': 2,
102
- 'require-atomic-updates': 2,
103
-
104
- // Best Practices (not in recommended)
105
- 'array-callback-return': 2,
106
- 'block-scoped-var': 2,
107
- 'complexity': 2,
108
- 'consistent-return': 2,
109
- 'curly': 2,
110
- 'default-case': 2,
111
- 'default-case-last': 2,
112
- 'default-param-last': 2,
113
- 'eqeqeq': 2,
114
- 'guard-for-in': 2,
115
- 'no-alert': 2,
116
- 'no-caller': 2,
117
- 'no-constructor-return': 2,
118
- 'no-else-return': 2,
119
- 'no-eq-null': 2,
120
- 'no-eval': 2,
121
- 'no-extend-native': 2,
122
- 'no-extra-bind': 2,
123
- 'no-extra-label': 2,
124
- 'no-floating-decimal': 2,
125
- 'no-implicit-coercion': 2,
126
- 'no-implied-eval': 2,
127
- 'no-iterator': 2,
128
- 'no-lone-blocks': 2,
129
- 'no-loop-func': 2,
130
- 'no-new': 2,
131
- 'no-new-func': 2,
132
- 'no-new-wrappers': 2,
133
- 'no-octal-escape': 2,
134
- 'no-proto': 2,
135
- 'no-restricted-properties': 2,
136
- 'no-return-assign': 2,
137
- 'no-return-await': 2,
138
- 'no-self-compare': 2,
139
- 'no-sequences': 2,
140
- 'no-throw-literal': 2,
141
- 'no-unmodified-loop-condition': 2,
142
- 'no-unused-expressions': 2,
143
- 'no-useless-call': 2,
144
- 'no-useless-concat': 2,
145
- 'no-useless-return': 2,
146
- 'no-void': 2,
147
- 'prefer-promise-reject-errors': 2,
148
- 'prefer-regex-literals': 2,
149
- 'radix': 2,
150
- 'require-await': 2,
151
- 'yoda': 2,
152
- 'strict': 2,
153
-
154
- // Variables
155
- 'no-label-var': 2,
156
- 'no-restricted-globals': 2,
157
- 'no-shadow': 2,
158
- 'no-use-before-define': [2, "nofunc"],
159
-
160
- // Stylistic Issues
161
- 'comma-dangle': 2,
162
- 'max-depth': 2,
163
- 'max-nested-callbacks': 2,
164
- 'new-cap': 2,
165
- 'new-parens': 2,
166
- 'no-array-constructor': 2,
167
- 'no-lonely-if': 2,
168
- 'no-new-object': 2,
169
- 'no-unneeded-ternary': 2,
170
- 'semi': 2,
171
-
172
- // ECMAScript 6
173
- 'no-useless-computed-key': 2,
174
- 'no-useless-constructor': 2,
175
- 'no-useless-rename': 2,
176
- 'no-var': 2,
177
- 'object-shorthand': 2,
178
- 'prefer-arrow-callback': 2,
179
- 'prefer-const': 2,
180
- 'prefer-spread': 2,
181
- 'prefer-template': 2
182
- }
183
- };