@momsfriendlydevco/eslint-config 2.2.0 → 2.2.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/eslint.config.js CHANGED
@@ -13,8 +13,7 @@ export default [
13
13
  // Generic globals
14
14
  languageOptions: {
15
15
  globals: {
16
- console: 'readonly',
17
- fetch: 'readonly',
16
+ // Put custom globals here
18
17
  },
19
18
  },
20
19
  },
package/index.js CHANGED
@@ -28,6 +28,22 @@ export let JSCommon = {
28
28
  };
29
29
 
30
30
  export default [
31
+ // Generic globals {{{
32
+ {
33
+ languageOptions: {
34
+ globals: {
35
+ clearInterval: 'readonly',
36
+ clearTimeout: 'readonly',
37
+ console: 'readonly',
38
+ fetch: 'readonly',
39
+ setInterval: 'readonly',
40
+ setTimeout: 'readonly',
41
+ window: 'readonly',
42
+ },
43
+ },
44
+ },
45
+ // }}}
46
+
31
47
  // eslint-plugin-jsdoc (with custom settings)
32
48
  {
33
49
  ...pluginJSDoc.configs['flat/recommended'],
@@ -45,7 +61,7 @@ export default [
45
61
  },
46
62
  },
47
63
 
48
- // eslint-plugin-unicorn
64
+ // eslint-plugin-unicorn {{{
49
65
  {
50
66
  ...pluginUnicorn.configs['flat/recommended'],
51
67
  rules: {
@@ -79,9 +95,11 @@ export default [
79
95
  'unicorn/switch-case-braces': ['warn', 'avoid'],
80
96
  },
81
97
  },
98
+ // }}}
82
99
 
83
- // eslint-plugin-vue
100
+ // eslint-plugin-vue {{{
84
101
  ...pluginVue.configs['flat/recommended'],
102
+ // }}}
85
103
 
86
104
  // .doop backend Files {{{
87
105
  {
@@ -109,6 +127,18 @@ export default [
109
127
  },
110
128
  // }}}
111
129
 
130
+ // Mocha test files {{{
131
+ {
132
+ files: ['**/test/**/*.js'],
133
+ languageOptions: {
134
+ globals: {
135
+ it: 'readonly',
136
+ describe: 'readonly',
137
+ },
138
+ },
139
+ },
140
+ // }}}
141
+
112
142
  // .vue frontend Files {{{
113
143
  {
114
144
  files: ['**/*.vue'],
@@ -117,6 +147,8 @@ export default [
117
147
  $: 'readable', // jQuery
118
148
  _: 'readable', // Lodash
119
149
  app: 'readable', // Global frontend app object
150
+ document: 'readable',
151
+ window: 'readable',
120
152
  },
121
153
  parser: eslintParser,
122
154
  parserOptions: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@momsfriendlydevco/eslint-config",
3
3
  "description": "ESLint plugin for @MomsFriendlyDevCo projects",
4
- "version": "2.2.0",
4
+ "version": "2.2.1",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "test": "eslint --config index.js test/data"