Skip to content

Commit 102f9f6

Browse files
committed
update eslint
1 parent 20f931f commit 102f9f6

5 files changed

Lines changed: 31 additions & 24 deletions

File tree

.eslintrc.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

.npmignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/.github
12
/test
2-
.eslintrc.js
3+
.eslint.config.js
34
.gitignore
5+
.gitattributes
6+
.npmrc

eslint.config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import js from '@eslint/js';
2+
import globals from 'globals';
3+
import { defineConfig } from 'eslint/config';
4+
import stylistic from '@stylistic/eslint-plugin';
5+
6+
export default defineConfig([
7+
{
8+
files: ['**/*.{js,mjs,cjs}'],
9+
plugins: {
10+
js,
11+
'@stylistic': stylistic
12+
},
13+
extends: ['js/recommended'],
14+
languageOptions: {
15+
globals: {
16+
...globals.browser,
17+
...globals.node,
18+
...globals.mocha
19+
}
20+
}
21+
}
22+
]);

lib/poparser.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ Parser.prototype._handleValues = function (tokens) {
421421
Parser.prototype._validateToken = function (
422422
{
423423
msgid = '',
424-
msgid_plural = '', // eslint-disable-line camelcase
424+
msgid_plural = '',
425425
msgstr = []
426426
},
427427
translations,
@@ -434,11 +434,8 @@ Parser.prototype._validateToken = function (
434434

435435
if (msgid in translations[msgctxt]) {
436436
throw new SyntaxError(`Duplicate msgid error: entry "${msgid}" in "${msgctxt}" context has already been declared.`);
437-
// eslint-disable-next-line camelcase
438437
} else if (msgid_plural && msgstr.length !== nplurals) {
439-
// eslint-disable-next-line camelcase
440438
throw new RangeError(`Plural forms range error: Expected to find ${nplurals} forms but got ${msgstr.length} for entry "${msgid_plural}" in "${msgctxt}" context.`);
441-
// eslint-disable-next-line camelcase
442439
} else if (!msgid_plural && msgstr.length !== 1) {
443440
throw new RangeError(`Translation string range error: Extected 1 msgstr definitions associated with "${msgid}" in "${msgctxt}" context, found ${msgstr.length}.`);
444441
}

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,11 @@
3232
"readable-stream": "^4.5.2"
3333
},
3434
"devDependencies": {
35+
"@eslint/js": "^9.35.0",
36+
"@stylistic/eslint-plugin": "^5.3.1",
3537
"chai": "^6.0.1",
36-
"eslint": "^8.56.0",
37-
"eslint-config-standard": "^17.1.0",
38-
"eslint-plugin-import": "^2.29.1",
39-
"eslint-plugin-n": "^16.6.2",
40-
"eslint-plugin-promise": "^6.1.1",
38+
"eslint": "^9.35.0",
39+
"globals": "^16.4.0",
4140
"mocha": "^11.7.2"
4241
},
4342
"keywords": [

0 commit comments

Comments
 (0)