@hellomouse/eslint-config 1.1.5 → 2.0.1-flat.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.
Files changed (3) hide show
  1. package/index.js +70 -66
  2. package/package.json +42 -32
  3. package/LICENSE +0 -21
package/index.js CHANGED
@@ -1,83 +1,87 @@
1
- module.exports = {
2
- extends: [
3
- 'eslint:recommended',
4
- 'eslint-config-google',
5
- 'plugin:jsdoc/recommended'
6
- ],
7
- // use new jsdoc comment as jsdoc functionality in core eslint is deprecated
8
- plugins: ['jsdoc'],
9
- rules: {
10
- // highly subjective: dangling commas feel weird,
11
- 'comma-dangle': ['error', 'never'],
1
+ import google from '@hellomouse/eslint-config-google';
2
+ import jsdoc from 'eslint-plugin-jsdoc';
3
+ import js from "@eslint/js";
12
4
 
13
- // so you can do n => +n instead of (n) => +n
14
- 'arrow-parens': ['error', 'as-needed'],
5
+ /** @type {import("eslint").Linter.FlatConfig[]} */
6
+ export default [
7
+ js.configs.recommended,
8
+ ...google,
9
+ jsdoc.configs.recommended,
10
+ {
11
+ // use new jsdoc comment as jsdoc functionality in core eslint is deprecated
12
+ plugins: {
13
+ jsdoc: jsdoc
14
+ },
15
+ rules: {
16
+ // highly subjective: dangling commas feel weird,
17
+ 'comma-dangle': ['error', 'never'],
15
18
 
16
- // 2 spaces for indent
17
- 'indent': ['error', 2, { SwitchCase: 1 }],
19
+ // so you can do n => +n instead of (n) => +n
20
+ 'arrow-parens': ['error', 'as-needed'],
18
21
 
19
- // console.log() is often used in node.js
20
- 'no-console': 'off',
22
+ // 2 spaces for indent
23
+ 'indent': ['error', 2, { SwitchCase: 1 }],
21
24
 
22
- // spaces after curly brackets look cleaner ({a: 4} vs { a: 4 })
23
- // also done by util.inspect
24
- 'object-curly-spacing': ['error', 'always'],
25
+ // console.log() is often used in node.js
26
+ 'no-console': 'off',
25
27
 
26
- // a + b rather than a+b, but allow integer hints to not have spaces (eg. b|0)
27
- 'space-infix-ops': ['error', { int32Hint: true }],
28
+ // spaces after curly brackets look cleaner ({a: 4} vs { a: 4 })
29
+ // also done by util.inspect
30
+ 'object-curly-spacing': ['error', 'always'],
28
31
 
29
- // lines should generally be kept short but definitely shouldn't be over 120 characters
30
- // allow long strings and regexes though
31
- 'max-len': ['error', {
32
- code: 120,
33
- ignoreUrls: true,
34
- ignoreStrings: true,
35
- ignoreTemplateLiterals: true,
36
- ignoreRegExpLiterals: true
37
- }],
32
+ // a + b rather than a+b, but allow integer hints to not have spaces (eg. b|0)
33
+ 'space-infix-ops': ['error', { int32Hint: true }],
38
34
 
39
- // == has weird behavior with types, always use === instead
40
- 'eqeqeq': ['error', 'always'],
35
+ // lines should generally be kept short but definitely shouldn't be over 120 characters
36
+ // allow long strings and regexes though
37
+ 'max-len': ['error', {
38
+ code: 120,
39
+ ignoreUrls: true,
40
+ ignoreStrings: true,
41
+ ignoreTemplateLiterals: true,
42
+ ignoreRegExpLiterals: true
43
+ }],
41
44
 
42
- // errors due to unintentional reassigning generally are quite rare, in addition,
43
- // changing from const to let is a bit annoying
44
- 'prefer-const': 'off',
45
+ // == has weird behavior with types, always use === instead
46
+ 'eqeqeq': ['error', 'always'],
45
47
 
46
- // use jsdoc/require-jsdoc instead
47
- 'require-jsdoc': 'off',
48
+ // errors due to unintentional reassigning generally are quite rare, in addition,
49
+ // changing from const to let is a bit annoying
50
+ 'prefer-const': 'off',
48
51
 
49
- // allow while (true)
50
- 'no-constant-condition': ['error', { checkLoops: false }],
52
+ // allow while (true)
53
+ 'no-constant-condition': ['error', { checkLoops: false }],
51
54
 
52
- // descriptions on params and return is often redundant
53
- // for example:
54
- /*
55
- * Adds given numbers
56
- *
57
- * @param {Number} a First number
58
- * @param {Number} b Second number
59
- * @return {Number} The result of the operation
60
- */
61
- 'jsdoc/require-param-description': 'off',
62
- 'jsdoc/require-returns-description': 'off',
55
+ // descriptions on params and return is often redundant
56
+ // for example:
57
+ /*
58
+ * Adds given numbers
59
+ *
60
+ * @param {Number} a First number
61
+ * @param {Number} b Second number
62
+ * @return {Number} The result of the operation
63
+ */
64
+ 'jsdoc/require-param-description': 'off',
65
+ 'jsdoc/require-returns-description': 'off',
63
66
 
64
- // not everything needs to be a complete sentence
65
- 'jsdoc/require-description-complete-sentence': 'off',
67
+ // not everything needs to be a complete sentence
68
+ 'jsdoc/require-description-complete-sentence': 'off',
66
69
 
67
- // most things explain themselves
68
- 'jsdoc/require-example': 'off',
70
+ // most things explain themselves
71
+ 'jsdoc/require-example': 'off',
69
72
 
70
- // don't worry about whether a newline exists after jsdoc description
71
- 'jsdoc/newline-after-description': 'off'
72
- },
73
- settings: {
74
- jsdoc: {
75
- tagNamePreference: {
76
- // keep the ones currently in use
77
- returns: { replacement: 'return' },
78
- yields: { replacement: 'yield' },
79
- augments: { replacement: 'extends' }
73
+ // don't worry about whether a newline exists after jsdoc description
74
+ 'jsdoc/newline-after-description': 'off'
75
+ },
76
+ settings: {
77
+ jsdoc: {
78
+ tagNamePreference: {
79
+ // keep the ones currently in use
80
+ returns: { replacement: 'return' },
81
+ yields: { replacement: 'yield' },
82
+ augments: { replacement: 'extends' }
83
+ }
80
84
  }
81
85
  }
82
86
  }
83
- };
87
+ ];
package/package.json CHANGED
@@ -1,34 +1,44 @@
1
1
  {
2
- "name": "@hellomouse/eslint-config",
3
- "version": "1.1.5",
4
- "description": "Official ESLint config for Hellomouse, based off of Google's config",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/hellomouse/eslint-config.git"
12
- },
13
- "keywords": [
14
- "eslint",
15
- "eslintconfig"
16
- ],
17
- "author": "Hellomouse",
18
- "contributors": [
19
- "iczero <iczero4@gmail.com>",
20
- "wolfy1339 <webmaster@wolfy1339.com>"
21
- ],
22
- "license": "MIT",
23
- "bugs": {
24
- "url": "https://github.com/hellomouse/eslint-config/issues"
25
- },
26
- "homepage": "https://github.com/hellomouse/eslint-config#readme",
27
- "peerDependencies": {
28
- "eslint": ">=6.2.2",
29
- "eslint-plugin-jsdoc": ">=15.8.3"
30
- },
31
- "dependencies": {
32
- "eslint-config-google": "^0.14.0"
33
- }
2
+ "name": "@hellomouse/eslint-config",
3
+ "version": "2.0.1-flat.0",
4
+ "description": "Official ESLint config for Hellomouse, based off of Google's config",
5
+ "type": "module",
6
+ "main": "index.js",
7
+ "scripts": {
8
+ "test": "echo \"Error: no test specified\" && exit 1"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/hellomouse/eslint-config.git",
13
+ "directory": "packages/js"
14
+ },
15
+ "keywords": [
16
+ "eslint",
17
+ "eslintconfig"
18
+ ],
19
+ "author": "Hellomouse",
20
+ "contributors": [
21
+ {
22
+ "name": "iczero",
23
+ "email": "iczero4@gmail.com"
24
+ },
25
+ {
26
+ "name": "wolfy1339",
27
+ "email": "webmaster@wolfy1339.com"
28
+ }
29
+ ],
30
+ "license": "MIT",
31
+ "bugs": {
32
+ "url": "https://github.com/hellomouse/eslint-config/issues"
33
+ },
34
+ "homepage": "https://github.com/hellomouse/eslint-config#readme",
35
+ "dependencies": {
36
+ "@stylistic/eslint-plugin": ">= 1.1.0",
37
+ "@eslint/js": "^9.2.0",
38
+ "eslint-plugin-jsdoc": ">=48.2.3",
39
+ "@hellomouse/eslint-config-google": "../google"
40
+ },
41
+ "peerDependencies": {
42
+ "eslint": ">=8.57"
43
+ }
34
44
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2019 hellomouse
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.