Skip to content

Commit

Permalink
update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
liborm85 committed Sep 6, 2024
1 parent efbfc0e commit 9d98fbb
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 45 deletions.
42 changes: 0 additions & 42 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
".github",
".npmignore",
".editorconfig",
".eslintrc.json",
"eslint.config.mjs",
"webpack.config.js",
"build-fonts.js",
"build-examples.js",
Expand Down
52 changes: 52 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import jsdoc from "eslint-plugin-jsdoc";
import globals from "globals";
import js from "@eslint/js";

export default [
{
ignores: ["src/3rd-party/svg-to-pdfkit/*"],
},

js.configs.recommended,

{
plugins: {
jsdoc,
},

languageOptions: {
globals: {
...globals.browser,
...globals.node,
...globals.mocha,
},

ecmaVersion: 9,
sourceType: "module",
},

rules: {
semi: 2,
"no-throw-literal": 2,
"no-prototype-builtins": 0,
"jsdoc/check-examples": 0,
"jsdoc/check-param-names": 1,
"jsdoc/check-tag-names": 1,
"jsdoc/check-types": 1,
"jsdoc/no-undefined-types": 1,
"jsdoc/require-description": 0,
"jsdoc/require-description-complete-sentence": 0,
"jsdoc/require-example": 0,
"jsdoc/require-hyphen-before-param-description": 0,
"jsdoc/require-param": 1,
"jsdoc/require-param-description": 0,
"jsdoc/require-param-name": 1,
"jsdoc/require-param-type": 1,
"jsdoc/require-returns": 1,
"jsdoc/require-returns-check": 1,
"jsdoc/require-returns-description": 0,
"jsdoc/require-returns-type": 1,
"jsdoc/valid-types": 1,
},
}
];
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@
"@babel/core": "^7.25.2",
"@babel/plugin-transform-modules-commonjs": "^7.24.8",
"@babel/preset-env": "^7.25.4",
"@eslint/js": "^9.9.1",
"assert": "^2.1.0",
"babel-loader": "^9.1.3",
"brfs": "^2.0.2",
"browserify-zlib": "^0.2.0",
"buffer": "6.0.3",
"core-js": "3.19.0",
"eslint": "^8.55.0",
"eslint-plugin-jsdoc": "^46.9.1",
"eslint": "^9.9.1",
"eslint-plugin-jsdoc": "^50.2.2",
"expose-loader": "^5.0.0",
"file-saver": "^2.0.5",
"globals": "^15.9.0",
"mocha": "^10.7.3",
"npm-run-all": "^4.1.5",
"process": "^0.11.10",
Expand Down

0 comments on commit 9d98fbb

Please sign in to comment.