Skip to content

Commit

Permalink
Merge pull request #520 from City-of-Helsinki/UHF-X_uninstall_pre_commit
Browse files Browse the repository at this point in the history
Linters for HDBT subtheme
  • Loading branch information
khalima authored Feb 17, 2025
2 parents dba2b75 + 2735d51 commit 12f8ba6
Show file tree
Hide file tree
Showing 5 changed files with 6,038 additions and 4,346 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
Loading

0 comments on commit 12f8ba6

Please sign in to comment.