Skip to content

Commit

Permalink
update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
liborm85 committed Nov 2, 2024
1 parent 40fb9d0 commit 41ddc2c
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 40 deletions.
37 changes: 0 additions & 37 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",
"webpack-standardfonts.config.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 @@ -18,16 +18,18 @@
"@babel/core": "^7.14.6",
"@babel/plugin-transform-modules-commonjs": "^7.14.5",
"@babel/preset-env": "^7.14.7",
"@eslint/js": "^9.14.0",
"assert": "^2.0.0",
"babel-loader": "^8.2.2",
"brfs": "^2.0.2",
"browserify-zlib": "^0.2.0",
"buffer": "^6.0.3",
"core-js": "3.19.0",
"eslint": "^7.29.0",
"eslint-plugin-jsdoc": "^35.4.1",
"eslint": "^9.14.0",
"eslint-plugin-jsdoc": "^50.4.3",
"expose-loader": "^3.0.0",
"file-saver": "^2.0.5",
"globals": "^15.11.0",
"mocha": "^9.0.1",
"npm-run-all": "^4.1.5",
"process": "^0.11.10",
Expand Down

0 comments on commit 41ddc2c

Please sign in to comment.