decidim 0.24.3 → 0.25.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Rakefile +28 -8
- data/babel.config.json +30 -0
- data/decidim-core/lib/decidim/webpacker/configuration.rb +89 -0
- data/decidim-core/lib/decidim/webpacker/postcss.config.js +16 -0
- data/decidim-core/lib/decidim/webpacker/runner.rb +24 -0
- data/decidim-core/lib/decidim/webpacker/webpack/base.js +6 -0
- data/decidim-core/lib/decidim/webpacker/webpack/custom.js +97 -0
- data/decidim-core/lib/decidim/webpacker/webpack/development.js +7 -0
- data/decidim-core/lib/decidim/webpacker/webpack/production.js +7 -0
- data/decidim-core/lib/decidim/webpacker/webpack/test.js +7 -0
- data/decidim-core/lib/decidim/webpacker/webpacker.yml +65 -0
- data/docs/README.adoc +1 -1
- data/docs/modules/configure/pages/initializer.adoc +31 -0
- data/docs/modules/customize/assets/images/modified_user_menu.png +0 -0
- data/docs/modules/customize/assets/images/original_user_menu.png +0 -0
- data/docs/modules/customize/pages/code.adoc +4 -1
- data/docs/modules/customize/pages/images.adoc +2 -2
- data/docs/modules/customize/pages/javascript.adoc +8 -3
- data/docs/modules/customize/pages/menu.adoc +56 -0
- data/docs/modules/customize/pages/styles.adoc +6 -3
- data/docs/modules/develop/pages/components.adoc +30 -0
- data/docs/modules/develop/pages/guide_migrate_webpacker_app.adoc +175 -0
- data/docs/modules/develop/pages/guide_migrate_webpacker_module.adoc +121 -0
- data/docs/modules/develop/pages/maps.adoc +2 -2
- data/docs/modules/develop/pages/newsletter_templates.adoc +1 -1
- data/docs/modules/develop/pages/releases.adoc +3 -1
- data/docs/modules/develop/pages/testing.adoc +11 -0
- data/docs/modules/develop/pages/view_models_aka_cells.adoc +1 -12
- data/docs/modules/install/pages/manual.adoc +46 -43
- data/docs/modules/services/pages/elections_bulletin_board.adoc +19 -16
- data/docs/modules/services/pages/social_providers.adoc +1 -1
- data/lib/decidim/gem_manager.rb +39 -18
- data/lib/decidim/version.rb +1 -1
- data/lib/decidim.rb +0 -4
- data/lib/tasks/decidim_tasks.rake +92 -0
- data/package-lock.json +36038 -0
- data/package.json +71 -0
- data/packages/browserslist-config/index.js +7 -0
- data/packages/browserslist-config/package.json +13 -0
- data/packages/core/node_modules/uuid/AUTHORS +5 -0
- data/packages/core/node_modules/uuid/CHANGELOG.md +119 -0
- data/packages/core/node_modules/uuid/LICENSE.md +21 -0
- data/packages/core/node_modules/uuid/README.md +276 -0
- data/packages/core/node_modules/uuid/bin/uuid +65 -0
- data/packages/core/node_modules/uuid/index.js +8 -0
- data/packages/core/node_modules/uuid/lib/bytesToUuid.js +26 -0
- data/packages/core/node_modules/uuid/lib/md5-browser.js +216 -0
- data/packages/core/node_modules/uuid/lib/md5.js +25 -0
- data/packages/core/node_modules/uuid/lib/rng-browser.js +34 -0
- data/packages/core/node_modules/uuid/lib/rng.js +8 -0
- data/packages/core/node_modules/uuid/lib/sha1-browser.js +89 -0
- data/packages/core/node_modules/uuid/lib/sha1.js +25 -0
- data/packages/core/node_modules/uuid/lib/v35.js +57 -0
- data/packages/core/node_modules/uuid/package.json +49 -0
- data/packages/core/node_modules/uuid/v1.js +109 -0
- data/packages/core/node_modules/uuid/v3.js +4 -0
- data/packages/core/node_modules/uuid/v4.js +29 -0
- data/packages/core/node_modules/uuid/v5.js +3 -0
- data/packages/core/package.json +53 -0
- data/packages/dev/package.json +15 -0
- data/packages/elections/package.json +17 -0
- data/packages/eslint-config/index.js +278 -0
- data/packages/eslint-config/package.json +24 -0
- data/packages/stylelint-config/index.js +160 -0
- data/packages/stylelint-config/package.json +16 -0
- data/packages/webpacker/index.js +6 -0
- data/packages/webpacker/package.json +50 -0
- data/packages/webpacker/src/override-config.js +52 -0
- metadata +92 -44
@@ -0,0 +1,53 @@
|
|
1
|
+
{
|
2
|
+
"name": "@decidim/core",
|
3
|
+
"description": "The core dependencies for Decidim",
|
4
|
+
"version": "0.25.0-rc4",
|
5
|
+
"repository": {
|
6
|
+
"url": "git@github.com:decidim/decidim.git",
|
7
|
+
"type": "git",
|
8
|
+
"directory": "packages/core"
|
9
|
+
},
|
10
|
+
"author": "Decidim Contributors",
|
11
|
+
"license": "AGPL-3.0",
|
12
|
+
"engines": {
|
13
|
+
"node": "^16.9.1",
|
14
|
+
"npm": "^7.21.1"
|
15
|
+
},
|
16
|
+
"dependencies": {
|
17
|
+
"@joeattardi/emoji-button": "^4.6.0",
|
18
|
+
"@zeitiger/appendaround": "^1.0.0",
|
19
|
+
"axios": "^0.21.1",
|
20
|
+
"bootstrap-tagsinput": "^0.7.1",
|
21
|
+
"classnames": "^2.2.5",
|
22
|
+
"d3": "5.4.0",
|
23
|
+
"diff": "^5.0.0",
|
24
|
+
"foundation-datepicker": "1.5.6",
|
25
|
+
"foundation-sites": "^6.7.0",
|
26
|
+
"graphiql": "^1.4.2",
|
27
|
+
"graphql-docs": "https://github.com/decidim/graphql-docs/raw/master/graphql-docs-0.2.1.tgz",
|
28
|
+
"html5sortable": "0.10.0",
|
29
|
+
"identity-obj-proxy": "^3.0.0",
|
30
|
+
"jquery": "^3.2.1",
|
31
|
+
"jquery-serializejson": "2.9.0",
|
32
|
+
"jquery.autocomplete": "1.2.0",
|
33
|
+
"leaflet": "1.3.1",
|
34
|
+
"leaflet-svgicon": "^0.0.2",
|
35
|
+
"leaflet-tilelayer-here": "1.0.2",
|
36
|
+
"leaflet.markercluster": "1.4.1",
|
37
|
+
"moment": "2.29.1",
|
38
|
+
"morphdom": "2.6.1",
|
39
|
+
"prop-types": "^15.7.2",
|
40
|
+
"quill": "1.3.7",
|
41
|
+
"raf": "^3.4.1",
|
42
|
+
"react": "^16.3.0",
|
43
|
+
"react-dom": "^16.3.0",
|
44
|
+
"react-i18nify": "^1.8.8",
|
45
|
+
"react-select": "^1.2.1",
|
46
|
+
"select": "^1.1.2",
|
47
|
+
"social-share-button": "2.2.0",
|
48
|
+
"svg4everybody": "2.1.9",
|
49
|
+
"tributejs": "5.1.3",
|
50
|
+
"unfetch": "^3.0.0",
|
51
|
+
"uuid": "^3.2.1"
|
52
|
+
}
|
53
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"name": "@decidim/dev",
|
3
|
+
"description": "The dev dependencies for Decidim",
|
4
|
+
"version": "0.25.0-rc4",
|
5
|
+
"repository": {
|
6
|
+
"url": "git@github.com:decidim/decidim.git",
|
7
|
+
"type": "git",
|
8
|
+
"directory": "packages/dev"
|
9
|
+
},
|
10
|
+
"author": "Decidim Contributors",
|
11
|
+
"license": "AGPL-3.0",
|
12
|
+
"dependencies": {
|
13
|
+
"axe-core": "^4.1.4"
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"name": "@decidim/elections",
|
3
|
+
"description": "The elections and votings dependencies for Decidim",
|
4
|
+
"version": "0.25.0-rc4",
|
5
|
+
"repository": {
|
6
|
+
"url": "git@github.com:decidim/decidim.git",
|
7
|
+
"type": "git",
|
8
|
+
"directory": "packages/elections"
|
9
|
+
},
|
10
|
+
"author": "Decidim Contributors",
|
11
|
+
"license": "AGPL-3.0",
|
12
|
+
"dependencies": {
|
13
|
+
"@codegram/decidim-bulletin_board": "0.21.2",
|
14
|
+
"@codegram/voting_schemes-dummy": "0.21.2",
|
15
|
+
"@codegram/voting_schemes-electionguard": "0.21.2"
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,278 @@
|
|
1
|
+
module.exports = { // eslint-disable-line
|
2
|
+
"env": {
|
3
|
+
"browser": true,
|
4
|
+
"es6": true
|
5
|
+
},
|
6
|
+
"extends": ["eslint:recommended", "plugin:react/recommended", "prettier"],
|
7
|
+
"parser": "@babel/eslint-parser",
|
8
|
+
"parserOptions": {
|
9
|
+
"ecmaFeatures": {
|
10
|
+
"experimentalObjectRestSpread": true,
|
11
|
+
"jsx": true
|
12
|
+
},
|
13
|
+
"sourceType": "module"
|
14
|
+
},
|
15
|
+
"plugins": [
|
16
|
+
"react"
|
17
|
+
],
|
18
|
+
"globals": {
|
19
|
+
"$": false,
|
20
|
+
"jQuery": false,
|
21
|
+
"React": false,
|
22
|
+
"ReactDOM": false,
|
23
|
+
"describe": false,
|
24
|
+
"it": false,
|
25
|
+
"expect": false,
|
26
|
+
"beforeEach": false,
|
27
|
+
"afterEach": false,
|
28
|
+
"sinon": false,
|
29
|
+
"GraphQLDocs": false,
|
30
|
+
"Quill": false,
|
31
|
+
"SVGInjector": false,
|
32
|
+
"require": false,
|
33
|
+
"DecidimAdmin": false,
|
34
|
+
"L": false,
|
35
|
+
"decidimBulletinBoard": false,
|
36
|
+
"Rails": false
|
37
|
+
},
|
38
|
+
"rules": {
|
39
|
+
"accessor-pairs": "error",
|
40
|
+
"array-bracket-spacing": "error",
|
41
|
+
"array-callback-return": "error",
|
42
|
+
"arrow-body-style": "off",
|
43
|
+
"arrow-parens": [
|
44
|
+
"error",
|
45
|
+
"always"
|
46
|
+
],
|
47
|
+
"arrow-spacing": [
|
48
|
+
"error",
|
49
|
+
{
|
50
|
+
"after": true,
|
51
|
+
"before": true
|
52
|
+
}
|
53
|
+
],
|
54
|
+
"block-scoped-var": "error",
|
55
|
+
"block-spacing": "off",
|
56
|
+
"callback-return": "error",
|
57
|
+
"camelcase": "error",
|
58
|
+
"class-methods-use-this": "off",
|
59
|
+
"comma-dangle": ["error", "never"],
|
60
|
+
"comma-spacing": [
|
61
|
+
"error",
|
62
|
+
{
|
63
|
+
"after": true,
|
64
|
+
"before": false
|
65
|
+
}
|
66
|
+
],
|
67
|
+
"comma-style": [
|
68
|
+
"error",
|
69
|
+
"last"
|
70
|
+
],
|
71
|
+
"complexity": "error",
|
72
|
+
"computed-property-spacing": [
|
73
|
+
"error",
|
74
|
+
"never"
|
75
|
+
],
|
76
|
+
"consistent-return": "error",
|
77
|
+
"consistent-this": "error",
|
78
|
+
"curly": "error",
|
79
|
+
"default-case": "error",
|
80
|
+
"dot-location": "error",
|
81
|
+
"dot-notation": "error",
|
82
|
+
"eol-last": "error",
|
83
|
+
"eqeqeq": "error",
|
84
|
+
"func-call-spacing": "error",
|
85
|
+
"func-name-matching": "error",
|
86
|
+
"func-names": [
|
87
|
+
"error",
|
88
|
+
"never"
|
89
|
+
],
|
90
|
+
"func-style": "error",
|
91
|
+
"generator-star-spacing": "error",
|
92
|
+
"global-require": "error",
|
93
|
+
"guard-for-in": "error",
|
94
|
+
"handle-callback-err": "error",
|
95
|
+
"id-blacklist": "error",
|
96
|
+
"id-length": "error",
|
97
|
+
"id-match": "error",
|
98
|
+
"indent": ["error", 2, { "VariableDeclarator": 2 }],
|
99
|
+
"init-declarations": "error",
|
100
|
+
"jsx-quotes": "error",
|
101
|
+
"key-spacing": "error",
|
102
|
+
"keyword-spacing": [
|
103
|
+
"error",
|
104
|
+
{
|
105
|
+
"after": true,
|
106
|
+
"before": true
|
107
|
+
}
|
108
|
+
],
|
109
|
+
"line-comment-position": "error",
|
110
|
+
"linebreak-style": [
|
111
|
+
"error",
|
112
|
+
"unix"
|
113
|
+
],
|
114
|
+
"lines-around-comment": "error",
|
115
|
+
"lines-around-directive": "error",
|
116
|
+
"max-depth": "error",
|
117
|
+
"max-len": "off",
|
118
|
+
"max-lines": "error",
|
119
|
+
"max-nested-callbacks": "error",
|
120
|
+
"max-params": "error",
|
121
|
+
"max-statements": "off",
|
122
|
+
"max-statements-per-line": "error",
|
123
|
+
"multiline-ternary": "error",
|
124
|
+
"new-cap": "error",
|
125
|
+
"new-parens": "error",
|
126
|
+
"newline-after-var": "off",
|
127
|
+
"newline-before-return": "off",
|
128
|
+
"newline-per-chained-call": "off",
|
129
|
+
"no-alert": "error",
|
130
|
+
"no-array-constructor": "error",
|
131
|
+
"no-bitwise": "error",
|
132
|
+
"no-caller": "error",
|
133
|
+
"no-catch-shadow": "error",
|
134
|
+
"no-confusing-arrow": "error",
|
135
|
+
"no-continue": "error",
|
136
|
+
"no-div-regex": "error",
|
137
|
+
"no-duplicate-imports": "error",
|
138
|
+
"no-else-return": "error",
|
139
|
+
"no-eq-null": "error",
|
140
|
+
"no-eval": "error",
|
141
|
+
"no-extend-native": "error",
|
142
|
+
"no-extra-bind": "error",
|
143
|
+
"no-extra-label": "error",
|
144
|
+
"no-extra-parens": "off",
|
145
|
+
"no-floating-decimal": "error",
|
146
|
+
"no-implicit-coercion": "error",
|
147
|
+
"no-implicit-globals": "error",
|
148
|
+
"no-implied-eval": "error",
|
149
|
+
"no-inline-comments": "error",
|
150
|
+
"no-invalid-this": "error",
|
151
|
+
"no-iterator": "error",
|
152
|
+
"no-label-var": "error",
|
153
|
+
"no-labels": "error",
|
154
|
+
"no-lone-blocks": "error",
|
155
|
+
"no-lonely-if": "error",
|
156
|
+
"no-loop-func": "error",
|
157
|
+
"no-magic-numbers": "off",
|
158
|
+
"no-mixed-requires": "error",
|
159
|
+
"no-multi-spaces": "off",
|
160
|
+
"no-multi-str": "error",
|
161
|
+
"no-multiple-empty-lines": "error",
|
162
|
+
"no-native-reassign": "error",
|
163
|
+
"no-negated-condition": "error",
|
164
|
+
"no-negated-in-lhs": "error",
|
165
|
+
"no-nested-ternary": "error",
|
166
|
+
"no-new": "error",
|
167
|
+
"no-new-func": "error",
|
168
|
+
"no-new-object": "error",
|
169
|
+
"no-new-require": "error",
|
170
|
+
"no-new-wrappers": "error",
|
171
|
+
"no-octal-escape": "error",
|
172
|
+
"no-param-reassign": "error",
|
173
|
+
"no-path-concat": "error",
|
174
|
+
"no-plusplus": "error",
|
175
|
+
"no-process-env": "error",
|
176
|
+
"no-process-exit": "error",
|
177
|
+
"no-proto": "error",
|
178
|
+
"no-prototype-builtins": "error",
|
179
|
+
"no-restricted-globals": "error",
|
180
|
+
"no-restricted-imports": "error",
|
181
|
+
"no-restricted-modules": "error",
|
182
|
+
"no-restricted-properties": "error",
|
183
|
+
"no-restricted-syntax": "error",
|
184
|
+
"no-return-assign": "error",
|
185
|
+
"no-script-url": "error",
|
186
|
+
"no-self-compare": "error",
|
187
|
+
"no-sequences": "error",
|
188
|
+
"no-shadow": "error",
|
189
|
+
"no-shadow-restricted-names": "error",
|
190
|
+
"no-spaced-func": "error",
|
191
|
+
"no-sync": "error",
|
192
|
+
"no-tabs": "error",
|
193
|
+
"no-template-curly-in-string": "error",
|
194
|
+
"no-ternary": "error",
|
195
|
+
"no-throw-literal": "error",
|
196
|
+
"no-trailing-spaces": "off",
|
197
|
+
"no-undef-init": "error",
|
198
|
+
"no-undefined": "error",
|
199
|
+
"no-underscore-dangle": "off",
|
200
|
+
"no-unmodified-loop-condition": "error",
|
201
|
+
"no-unneeded-ternary": "error",
|
202
|
+
"no-unused-expressions": "error",
|
203
|
+
"no-use-before-define": "error",
|
204
|
+
"no-useless-call": "error",
|
205
|
+
"no-useless-computed-key": "error",
|
206
|
+
"no-useless-concat": "error",
|
207
|
+
"no-useless-constructor": "error",
|
208
|
+
"no-useless-escape": "error",
|
209
|
+
"no-useless-rename": "error",
|
210
|
+
"no-var": "error",
|
211
|
+
"no-void": "error",
|
212
|
+
"no-warning-comments": "error",
|
213
|
+
"no-whitespace-before-property": "error",
|
214
|
+
"no-with": "error",
|
215
|
+
"object-curly-newline": "off",
|
216
|
+
"object-curly-spacing": "off",
|
217
|
+
"object-property-newline": [
|
218
|
+
"error",
|
219
|
+
{
|
220
|
+
"allowMultiplePropertiesPerLine": true
|
221
|
+
}
|
222
|
+
],
|
223
|
+
"object-shorthand": "off",
|
224
|
+
"one-var": "off",
|
225
|
+
"one-var-declaration-per-line": "error",
|
226
|
+
"operator-assignment": "error",
|
227
|
+
"operator-linebreak": "error",
|
228
|
+
"padded-blocks": "off",
|
229
|
+
"prefer-arrow-callback": "off",
|
230
|
+
"prefer-const": "off",
|
231
|
+
"prefer-numeric-literals": "error",
|
232
|
+
"prefer-reflect": "error",
|
233
|
+
"prefer-rest-params": "error",
|
234
|
+
"prefer-spread": "error",
|
235
|
+
"prefer-template": "error",
|
236
|
+
"quote-props": "off",
|
237
|
+
"quotes": ["error", "double", { "avoidEscape": true }],
|
238
|
+
"radix": "error",
|
239
|
+
"require-jsdoc": "error",
|
240
|
+
"rest-spread-spacing": "error",
|
241
|
+
"semi": "off",
|
242
|
+
"semi-spacing": "error",
|
243
|
+
"sort-imports": "off",
|
244
|
+
"sort-keys": "off",
|
245
|
+
"sort-vars": "error",
|
246
|
+
"space-before-blocks": "error",
|
247
|
+
"space-before-function-paren": "off",
|
248
|
+
"space-in-parens": [
|
249
|
+
"error",
|
250
|
+
"never"
|
251
|
+
],
|
252
|
+
"space-infix-ops": "error",
|
253
|
+
"space-unary-ops": "error",
|
254
|
+
"spaced-comment": [
|
255
|
+
"error",
|
256
|
+
"always"
|
257
|
+
],
|
258
|
+
"strict": "error",
|
259
|
+
"symbol-description": "error",
|
260
|
+
"template-curly-spacing": "error",
|
261
|
+
"unicode-bom": [
|
262
|
+
"error",
|
263
|
+
"never"
|
264
|
+
],
|
265
|
+
"valid-jsdoc": "error",
|
266
|
+
"vars-on-top": "error",
|
267
|
+
"wrap-iife": "error",
|
268
|
+
"wrap-regex": "error",
|
269
|
+
"yield-star-spacing": "error",
|
270
|
+
"yoda": "error",
|
271
|
+
"import/no-named-as-default": "off",
|
272
|
+
"import/no-extraneous-dependencies": "off",
|
273
|
+
"react/prefer-stateless-function": "off",
|
274
|
+
"react/jsx-filename-extension": "off",
|
275
|
+
"react/no-multi-comp": "off",
|
276
|
+
"react/sort-comp": "off"
|
277
|
+
}
|
278
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
{
|
2
|
+
"name": "@decidim/eslint-config",
|
3
|
+
"description": "The eslint configuration for Decidim",
|
4
|
+
"version": "0.25.0-rc4",
|
5
|
+
"repository": {
|
6
|
+
"url": "git@github.com:decidim/decidim.git",
|
7
|
+
"type": "git",
|
8
|
+
"directory": "packages/eslint-config"
|
9
|
+
},
|
10
|
+
"author": "Decidim Contributors",
|
11
|
+
"license": "AGPL-3.0",
|
12
|
+
"main": "index.js",
|
13
|
+
"peerDependencies": {
|
14
|
+
"eslint": "^7.25.0",
|
15
|
+
"eslint-config-prettier": "^8.2.0",
|
16
|
+
"eslint-config-standard": "^11.0.0",
|
17
|
+
"eslint-plugin-import": "^2.22.0",
|
18
|
+
"eslint-plugin-jsx-a11y": "^6.3.1",
|
19
|
+
"eslint-plugin-node": "^11.1.0",
|
20
|
+
"eslint-plugin-promise": "^3.8.0",
|
21
|
+
"eslint-plugin-react": "^7.20.6",
|
22
|
+
"eslint-plugin-standard": "^3.1.0"
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,160 @@
|
|
1
|
+
module.exports = { // eslint-disable-line
|
2
|
+
"rules": {
|
3
|
+
"at-rule-empty-line-before": [
|
4
|
+
"always",
|
5
|
+
{
|
6
|
+
"except": [
|
7
|
+
"blockless-after-same-name-blockless",
|
8
|
+
"first-nested"
|
9
|
+
],
|
10
|
+
"ignore": [
|
11
|
+
"after-comment"
|
12
|
+
],
|
13
|
+
"ignoreAtRules": [
|
14
|
+
"else"
|
15
|
+
]
|
16
|
+
}
|
17
|
+
],
|
18
|
+
"at-rule-name-case": "lower",
|
19
|
+
"at-rule-semicolon-newline-after": "always",
|
20
|
+
"block-closing-brace-empty-line-before": "never",
|
21
|
+
"block-closing-brace-newline-after": "always",
|
22
|
+
"block-closing-brace-newline-before": "always-multi-line",
|
23
|
+
"block-closing-brace-space-before": "always-single-line",
|
24
|
+
"block-no-empty": true,
|
25
|
+
"block-opening-brace-newline-after": "always-multi-line",
|
26
|
+
"block-opening-brace-space-after": "always-single-line",
|
27
|
+
"block-opening-brace-space-before": "never",
|
28
|
+
"color-hex-case": "lower",
|
29
|
+
"color-hex-length": "short",
|
30
|
+
"color-no-invalid-hex": true,
|
31
|
+
"comment-empty-line-before": [
|
32
|
+
"always",
|
33
|
+
{
|
34
|
+
"except": [
|
35
|
+
"first-nested"
|
36
|
+
],
|
37
|
+
"ignore": [
|
38
|
+
"stylelint-commands"
|
39
|
+
]
|
40
|
+
}
|
41
|
+
],
|
42
|
+
"comment-no-empty": true,
|
43
|
+
"comment-whitespace-inside": "always",
|
44
|
+
"custom-property-empty-line-before": [
|
45
|
+
"always",
|
46
|
+
{
|
47
|
+
"except": [
|
48
|
+
"after-custom-property",
|
49
|
+
"first-nested"
|
50
|
+
],
|
51
|
+
"ignore": [
|
52
|
+
"after-comment",
|
53
|
+
"inside-single-line-block"
|
54
|
+
]
|
55
|
+
}
|
56
|
+
],
|
57
|
+
"declaration-bang-space-after": "never",
|
58
|
+
"declaration-bang-space-before": "always",
|
59
|
+
"declaration-block-no-duplicate-properties": [
|
60
|
+
true,
|
61
|
+
{
|
62
|
+
"ignore": [
|
63
|
+
"consecutive-duplicates-with-different-values"
|
64
|
+
]
|
65
|
+
}
|
66
|
+
],
|
67
|
+
"declaration-block-no-redundant-longhand-properties": true,
|
68
|
+
"declaration-block-no-shorthand-property-overrides": true,
|
69
|
+
"declaration-block-semicolon-newline-after": "always-multi-line",
|
70
|
+
"declaration-block-semicolon-space-after": "always-single-line",
|
71
|
+
"declaration-block-semicolon-space-before": "never",
|
72
|
+
"declaration-block-single-line-max-declarations": 1,
|
73
|
+
"declaration-block-trailing-semicolon": "always",
|
74
|
+
"declaration-colon-newline-after": "always-multi-line",
|
75
|
+
"declaration-colon-space-after": "always-single-line",
|
76
|
+
"declaration-colon-space-before": "never",
|
77
|
+
"declaration-empty-line-before": [
|
78
|
+
"always",
|
79
|
+
{
|
80
|
+
"except": [
|
81
|
+
"after-declaration",
|
82
|
+
"first-nested"
|
83
|
+
],
|
84
|
+
"ignore": [
|
85
|
+
"after-comment",
|
86
|
+
"inside-single-line-block"
|
87
|
+
]
|
88
|
+
}
|
89
|
+
],
|
90
|
+
"function-calc-no-unspaced-operator": true,
|
91
|
+
"function-comma-newline-after": "always-multi-line",
|
92
|
+
"function-comma-space-after": "always-single-line",
|
93
|
+
"function-comma-space-before": "never",
|
94
|
+
"function-linear-gradient-no-nonstandard-direction": true,
|
95
|
+
"function-max-empty-lines": 0,
|
96
|
+
"function-name-case": "lower",
|
97
|
+
"function-parentheses-newline-inside": "always-multi-line",
|
98
|
+
"function-parentheses-space-inside": "never-single-line",
|
99
|
+
"function-whitespace-after": "always",
|
100
|
+
"indentation": 2,
|
101
|
+
"keyframe-declaration-no-important": true,
|
102
|
+
"length-zero-no-unit": true,
|
103
|
+
"max-empty-lines": 1,
|
104
|
+
"media-feature-colon-space-after": "always",
|
105
|
+
"media-feature-colon-space-before": "never",
|
106
|
+
"media-feature-name-case": "lower",
|
107
|
+
"media-feature-name-no-unknown": true,
|
108
|
+
"media-feature-parentheses-space-inside": "never",
|
109
|
+
"media-feature-range-operator-space-after": "always",
|
110
|
+
"media-feature-range-operator-space-before": "always",
|
111
|
+
"media-query-list-comma-newline-after": "always-multi-line",
|
112
|
+
"media-query-list-comma-space-after": "always-single-line",
|
113
|
+
"media-query-list-comma-space-before": "never",
|
114
|
+
"no-empty-source": true,
|
115
|
+
"no-eol-whitespace": true,
|
116
|
+
"no-extra-semicolons": true,
|
117
|
+
"no-invalid-double-slash-comments": true,
|
118
|
+
"no-missing-end-of-source-newline": true,
|
119
|
+
"number-leading-zero": "never",
|
120
|
+
"number-no-trailing-zeros": true,
|
121
|
+
"property-case": "lower",
|
122
|
+
"property-no-unknown": true,
|
123
|
+
"rule-empty-line-before": [
|
124
|
+
"always-multi-line",
|
125
|
+
{
|
126
|
+
"except": [
|
127
|
+
"first-nested"
|
128
|
+
],
|
129
|
+
"ignore": [
|
130
|
+
"after-comment"
|
131
|
+
]
|
132
|
+
}
|
133
|
+
],
|
134
|
+
"selector-attribute-brackets-space-inside": "never",
|
135
|
+
"selector-attribute-operator-space-after": "never",
|
136
|
+
"selector-attribute-operator-space-before": "never",
|
137
|
+
"selector-combinator-space-after": "always",
|
138
|
+
"selector-combinator-space-before": "always",
|
139
|
+
"selector-descendant-combinator-no-non-space": true,
|
140
|
+
"selector-list-comma-newline-after": "always",
|
141
|
+
"selector-list-comma-space-before": "never",
|
142
|
+
"selector-max-empty-lines": 0,
|
143
|
+
"selector-pseudo-class-case": "lower",
|
144
|
+
"selector-pseudo-class-no-unknown": true,
|
145
|
+
"selector-pseudo-class-parentheses-space-inside": "never",
|
146
|
+
"selector-pseudo-element-case": "lower",
|
147
|
+
"selector-pseudo-element-colon-notation": "double",
|
148
|
+
"selector-pseudo-element-no-unknown": true,
|
149
|
+
"selector-type-case": "lower",
|
150
|
+
"selector-type-no-unknown": true,
|
151
|
+
"shorthand-property-no-redundant-values": true,
|
152
|
+
"string-no-newline": true,
|
153
|
+
"unit-case": "lower",
|
154
|
+
"unit-no-unknown": true,
|
155
|
+
"value-list-comma-newline-after": "always-multi-line",
|
156
|
+
"value-list-comma-space-after": "always-single-line",
|
157
|
+
"value-list-comma-space-before": "never",
|
158
|
+
"value-list-max-empty-lines": 0
|
159
|
+
}
|
160
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"name": "@decidim/stylelint-config",
|
3
|
+
"description": "The stylelint configuration for Decidim",
|
4
|
+
"version": "0.25.0-rc4",
|
5
|
+
"repository": {
|
6
|
+
"url": "git@github.com:decidim/decidim.git",
|
7
|
+
"type": "git",
|
8
|
+
"directory": "packages/stylelint-config"
|
9
|
+
},
|
10
|
+
"author": "Decidim Contributors",
|
11
|
+
"license": "AGPL-3.0",
|
12
|
+
"main": "index.js",
|
13
|
+
"peerDependencies": {
|
14
|
+
"stylelint": "13.11.0"
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
{
|
2
|
+
"name": "@decidim/webpacker",
|
3
|
+
"description": "The webpacker dependencies for Decidim",
|
4
|
+
"version": "0.25.0-rc4",
|
5
|
+
"repository": {
|
6
|
+
"url": "git@github.com:decidim/decidim.git",
|
7
|
+
"type": "git",
|
8
|
+
"directory": "packages/webpacker"
|
9
|
+
},
|
10
|
+
"author": "Decidim Contributors",
|
11
|
+
"license": "AGPL-3.0",
|
12
|
+
"main": "index.js",
|
13
|
+
"dependencies": {
|
14
|
+
"@babel/core": "^7.13.13",
|
15
|
+
"@babel/eslint-parser": "^7.13.14",
|
16
|
+
"@babel/plugin-transform-classes": "^7.13.0",
|
17
|
+
"@babel/plugin-transform-regenerator": "^7.13.15",
|
18
|
+
"@babel/plugin-transform-runtime": "^7.13.15",
|
19
|
+
"@babel/preset-env": "^7.13.5",
|
20
|
+
"@babel/preset-react": "^7.12.13",
|
21
|
+
"@babel/types": "^7.0.0-beta.40",
|
22
|
+
"@rails/ujs": "^6.1.3",
|
23
|
+
"@rails/webpacker": "6.0.0-rc.5",
|
24
|
+
"@webpack-cli/serve": "^1.3.1",
|
25
|
+
"autoprefixer": "^9.8.6",
|
26
|
+
"babel-loader": "^8.0.4",
|
27
|
+
"babel-plugin-__coverage__": "^1.11.111",
|
28
|
+
"babel-preset-airbnb": "^5.0.0",
|
29
|
+
"core-js": "^3.9.1",
|
30
|
+
"css-loader": "^4.3.0",
|
31
|
+
"css-minimizer-webpack-plugin": "^1.3.0",
|
32
|
+
"expose-loader": "^2.0.0",
|
33
|
+
"mini-css-extract-plugin": "^1.4.0",
|
34
|
+
"postcss": "^7.0.36",
|
35
|
+
"postcss-flexbugs-fixes": "^4.2.1",
|
36
|
+
"postcss-import": "^12.0.1",
|
37
|
+
"postcss-loader": "^5.2.0",
|
38
|
+
"postcss-preset-env": "^6.7.0",
|
39
|
+
"postcss-scss": "^2.1.1",
|
40
|
+
"sass": "^1.32.8",
|
41
|
+
"sass-loader": "^11.0.1",
|
42
|
+
"source-map-loader": "^0.2.4",
|
43
|
+
"style-loader": "^2.0.0",
|
44
|
+
"webpack": "^5.11.0",
|
45
|
+
"webpack-bundle-analyzer": "^3.8.0",
|
46
|
+
"webpack-cli": "^4.2.0",
|
47
|
+
"webpack-config-utils": "^2.3.1",
|
48
|
+
"webpack-dev-server": "^4.0.0"
|
49
|
+
}
|
50
|
+
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
const { config } = require("@rails/webpacker");
|
2
|
+
|
3
|
+
const overrideSassRule = (modifyConfig) => {
|
4
|
+
const sassRule = modifyConfig.module.rules.find(
|
5
|
+
(rule) => rule.test.toString() === "/\\.(scss|sass)(\\.erb)?$/i"
|
6
|
+
);
|
7
|
+
if (!sassRule) {
|
8
|
+
return modifyConfig;
|
9
|
+
}
|
10
|
+
|
11
|
+
const sassLoader = sassRule.use.find((use) => {
|
12
|
+
return (typeof use === "object") && use.loader.match(/sass-loader/);
|
13
|
+
});
|
14
|
+
if (!sassLoader) {
|
15
|
+
return modifyConfig;
|
16
|
+
}
|
17
|
+
|
18
|
+
const imports = config.stylesheet_imports;
|
19
|
+
if (!imports) {
|
20
|
+
return modifyConfig;
|
21
|
+
}
|
22
|
+
|
23
|
+
// Add the extra importer to the sass-loader to load the import statements for
|
24
|
+
// Decidim modules.
|
25
|
+
sassLoader.options.sassOptions.importer = [
|
26
|
+
(url) => {
|
27
|
+
const matches = url.match(/^!decidim-style-([^[]+)\[([^\]]+)\]$/);
|
28
|
+
if (!matches) {
|
29
|
+
return null;
|
30
|
+
}
|
31
|
+
|
32
|
+
const type = matches[1];
|
33
|
+
const group = matches[2];
|
34
|
+
if (!imports[type] || !imports[type][group]) {
|
35
|
+
// If the group is not defined, return an empty configuration because
|
36
|
+
// otherwise the importer would continue finding the asset through
|
37
|
+
// paths which obviously fails.
|
38
|
+
return { contents: "" };
|
39
|
+
}
|
40
|
+
|
41
|
+
const statements = imports[type][group].map((style) => `@import "${style}";`);
|
42
|
+
|
43
|
+
return { contents: statements.join("\n") };
|
44
|
+
}
|
45
|
+
];
|
46
|
+
|
47
|
+
return modifyConfig;
|
48
|
+
}
|
49
|
+
|
50
|
+
module.exports = (originalConfig) => { // eslint-disable-line
|
51
|
+
return overrideSassRule(originalConfig);
|
52
|
+
};
|