c3b-lint 0.0.17 → 0.0.18

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.
@@ -130,8 +130,13 @@ export const librarySrc = {
130
130
  }
131
131
  };
132
132
 
133
- // the "ignoreLength" files: everything but max-lines still applies (ESLint refuses an empty files list)
134
- const lengthExempt = settings.ignoreLength.length ? [{ files: settings.ignoreLength, rules: { 'max-lines': 'off' } }] : [];
133
+ // the "ignoreLength" files: everything but max-lines still applies (ESLint refuses an empty files list).
134
+ // Each glob is ANDed with the JS extensions (a nested array): a `files` pattern also adds what it matches
135
+ // to what ESLint lints, so a bare "src/index.html" here had ESLint parse the page as JavaScript.
136
+ const JS_FILES = '**/*.{js,mjs,cjs}';
137
+ const lengthExempt = settings.ignoreLength.length
138
+ ? [{ files: settings.ignoreLength.map((glob) => [glob, JS_FILES]), rules: { 'max-lines': 'off' } }]
139
+ : [];
135
140
 
136
141
  export default [
137
142
  { ignores: ['node_modules/**', 'dist/**', 'c10g/**', 'src/**/vendor/**', '**/*.min.js', ...settings.ignore] },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c3b-lint",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "Lints a co:lab project against the rules a tool can check: ESLint, Stylelint, the 500-line limit and the shared .editorconfig; --init writes the config files.",
5
5
  "license": "GPL-3.0",
6
6
  "type": "module",