Skip to content

Commit

Permalink
Added no-error-on-unmatched-pattern flag to eslint.
Browse files Browse the repository at this point in the history
  • Loading branch information
khalima committed Feb 11, 2025
1 parent 247ca1e commit c02794e
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 2 deletions.
3 changes: 3 additions & 0 deletions public/themes/custom/hdbt_subtheme/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/**/*
webpack.config.js
webpack.svgToSprite.js
76 changes: 76 additions & 0 deletions public/themes/custom/hdbt_subtheme/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"root": true,
"env": {
"browser": true,
"node": true,
"es6": true
},
"extends": [
"airbnb-base",
"prettier",
"plugin:import/recommended"
],
"plugins": [
"jsdoc"
],
"parserOptions": {
"ecmaVersion": 2022,
"sourceType": "module"
},
"globals": {
"Drupal": true,
"drupalSettings": true,
"drupalTranslations": true,
"jQuery": true,
"_": true,
"Cookies": true,
"Backbone": true,
"Modernizr": true,
"Popper": true,
"Shepherd": true,
"Sortable": true,
"once": true,
"CKEDITOR": true,
"tabbable": true
},
"rules": {
"arrow-spacing": ["warn", { "before": true, "after": true }],
"comma-spacing": ["warn", { "before": false, "after": true }],
"consistent-return": ["off"],
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}],
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
"max-nested-callbacks": ["warn", 5],
"no-plusplus": [
"warn",
{
"allowForLoopAfterthoughts": true
}
],
"no-param-reassign": ["off"],
"no-prototype-builtins": ["off"],
"no-unused-vars": ["warn"],
"no-underscore-dangle": ["off"],
"no-whitespace-before-property": "warn",
"object-curly-spacing": ["error", "always"],
"operator-linebreak": [
"error",
"after",
{ "overrides": { "?": "ignore", ":": "ignore" } }
],
"prefer-arrow-callback":["off"],
"quotes": ["warn", "single"],
"semi": ["error", "always"],
"space-in-parens": ["warn", "never"],
"space-before-function-paren": ["error", "never"],
"valid-jsdoc": [
"warn",
{
"prefer": {
"returns": "return",
"property": "prop"
},
"requireReturn": false
}
]
}
}
2 changes: 1 addition & 1 deletion public/themes/custom/hdbt_subtheme/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
23
2 changes: 1 addition & 1 deletion public/themes/custom/hdbt_subtheme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "npm run lint -s && webpack --progress --mode=production --config webpack.config.js",
"preinstall": "npx update-browserslist-db@latest",
"lint:scss": "npx postcss src/scss/**/*.scss --syntax postcss-scss --use css-declaration-sorter --replace --no-map",
"lint:js": "eslint --fix src/js/",
"lint:js": "eslint --fix src/js/ --no-error-on-unmatched-pattern",
"lint": "npm run lint:scss && npm run lint:js"
},
"dependencies": {
Expand Down

0 comments on commit c02794e

Please sign in to comment.