Skip to content

Commit

Permalink
add Drupal core .eslintrc.json
Browse files Browse the repository at this point in the history
  • Loading branch information
WengerK committed Apr 4, 2024
1 parent 0bf396f commit 304a9b6
Show file tree
Hide file tree
Showing 7 changed files with 1,054 additions and 1,021 deletions.
97 changes: 54 additions & 43 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,56 @@
{
"extends": [
"airbnb",
"plugin:prettier/recommended"
],
"root": true,
"env": {
"browser": true,
"es6": true,
"node": true
},
"globals": {
"Drupal": true,
"drupalSettings": true,
"drupalTranslations": true,
"domready": true,
"jQuery": true,
"_": true,
"matchMedia": true,
"Backbone": true,
"Modernizr": true,
"CKEDITOR": true
},
"rules": {
"prettier/prettier": "error",
"consistent-return": ["off"],
"no-underscore-dangle": ["off"],
"max-nested-callbacks": ["warn", 3],
"import/no-mutable-exports": ["warn"],
"no-plusplus": ["warn", {
"allowForLoopAfterthoughts": true
}],
"no-param-reassign": ["off"],
"no-prototype-builtins": ["off"],
"valid-jsdoc": ["warn", {
"prefer": {
"returns": "return",
"property": "prop"
},
"requireReturn": false
}],
"no-unused-vars": ["warn"],
"operator-linebreak": ["error", "after", { "overrides": { "?": "ignore", ":": "ignore" } }]
}
"extends": [
"airbnb-base",
"plugin:prettier/recommended",
"plugin:yml/recommended"
],
"root": true,
"env": {
"browser": true,
"es6": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 2020
},
"globals": {
"Drupal": true,
"drupalSettings": true,
"drupalTranslations": true,
"jQuery": true,
"_": true,
"Cookies": true,
"Backbone": true,
"Modernizr": true,
"loadjs": true,
"Shepherd": true,
"Sortable": true,
"once": true,
"CKEditor5": true,
"tabbable": true,
"slugify": true,
"bodyScrollLock" : true
},
"rules": {
"prettier/prettier": "error",
"consistent-return": ["off"],
"no-underscore-dangle": ["off"],
"max-nested-callbacks": ["warn", 3],
"import/no-mutable-exports": ["warn"],
"no-plusplus": ["warn", {
"allowForLoopAfterthoughts": true
}],
"no-param-reassign": ["off"],
"no-prototype-builtins": ["off"],
"valid-jsdoc": ["warn", {
"prefer": {
"returns": "return",
"property": "prop"
},
"requireReturn": false
}],
"no-unused-vars": ["warn"],
"operator-linebreak": ["error", "after", { "overrides": { "?": "ignore", ":": "ignore" } }],
"yml/indent": ["error", 2]
}
}
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: '3.6'
version: "3.6"

services:

drupal:
build: .
depends_on:
Expand Down
4 changes: 2 additions & 2 deletions nbsp.info.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 'CKEditor Non-breaking space Plugin'
name: "CKEditor Non-breaking space Plugin"
type: module
description: 'Minimal module to insert a non-breaking space into the content by pressing Ctrl+Space or using the provided button.'
description: "Minimal module to insert a non-breaking space into the content by pressing Ctrl+Space or using the provided button."
core_version_requirement: ^10
package: CKEditor

Expand Down
4 changes: 2 additions & 2 deletions nbsp.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ nbsp.ckeditor5:
js/build/nbsp.js: { minified: true }
css:
theme:
css/ckeditor.nbsp.css: { }
css/ckeditor.nbsp.css: {}
dependencies:
- core/drupal
- core/ckeditor5

nbsp.admin:
css:
theme:
css/nbsp.admin.css: { }
css/nbsp.admin.css: {}
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
"devDependencies": {
"@ckeditor/ckeditor5-dev-utils": "^25.4.5",
"ckeditor5": "~31.0.0",
"eslint": "^4.19.1",
"eslint-config-airbnb": "^17.0.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-import": "^2.13.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-prettier": "^2.6.2",
"eslint-plugin-react": "^7.10.0",
"prettier": "^2.0",
"eslint": "^8.57.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jquery": "^1.5.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-yml": "^1.14.0",
"prettier": "^3.2.5",
"raw-loader": "^4.0.2",
"stylelint": "^16.3.1",
"stylelint-checkstyle-formatter": "^0.1.2",
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ getDirectories("./js/ckeditor5_plugins").forEach((dir) => {
__dirname,
"js/ckeditor5_plugins",
dir,
"src/index.js"
"src/index.js",
),
},
output: {
Expand Down
Loading

0 comments on commit 304a9b6

Please sign in to comment.