-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split CI and configure linters for .md, .js, .scss and .erb files (#514)
* Split CI and configure linters for .md, .js, .scss and .erb files * Update README.md
- Loading branch information
Showing
37 changed files
with
546 additions
and
440 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--exclude-exts=.min.css | ||
--ignore=adjoining-classes,box-model,ids,order-alphabetical,unqualified-attributes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
|
||
linters: | ||
ExtraNewline: | ||
enabled: true | ||
|
||
FinalNewline: | ||
enabled: true | ||
|
||
SpaceAroundErbTag: | ||
enabled: true | ||
|
||
AllowedScriptType: | ||
enabled: true | ||
allowed_types: | ||
- text/javascript | ||
- text/template | ||
|
||
Rubocop: | ||
enabled: true | ||
|
||
rubocop_config: | ||
AllCops: | ||
DisabledByDefault: true | ||
|
||
Style/StringLiterals: | ||
EnforcedStyle: double_quotes | ||
|
||
Layout/SpaceInsideHashLiteralBraces: | ||
Enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
**/*{.,-}min.js | ||
decidim-*/vendor/**/*.js | ||
**/node_modules/** | ||
bundle.js | ||
karma.conf.js | ||
webpack.config.js | ||
webpack.config.babel.js | ||
entry.test.js | ||
entry.js | ||
*_manifest.js | ||
coverage | ||
vendor/bundle | ||
**/vendor/**/*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "@decidim" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,12 @@ | ||
<!-- | ||
1. Please check if an issue already exists so there are no duplicates | ||
2. Fill out the whole template so we have a good overview on the issue | ||
3. Do not remove any section of the template. If something is not applicable leave it empty but leave it in the Issue | ||
4. Please follow the template, otherwise we'll have to ask you to update it | ||
--> | ||
#### :tophat: User Story | ||
|
||
# This is a (Bug Report / Feature Proposal) | ||
|
||
#### :tophat: Description | ||
#### :clipboard: Related documentation | ||
|
||
For bug reports: | ||
* What went wrong? | ||
* What did you expect should have happened? | ||
* What was the config you used? | ||
* What stacktrace or error message from your provider did you see? | ||
|
||
For feature proposals: | ||
* What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us. | ||
* If there is additional config how would it look | ||
#### :dart: Acceptance criteria | ||
|
||
|
||
#### :pushpin: Related issues | ||
* #12345 | ||
|
||
#### :clipboard: Additional Data | ||
|
||
* ***Decidim deployment where you found the issue***: | ||
* ***Browser & version***: | ||
* ***Screenshot***: | ||
* ***Error messages***: | ||
* ***URL to reproduce the error***: |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Lint | ||
on: [push] | ||
|
||
env: | ||
RUBY_VERSION: 3.0.2 | ||
NODE_VERSION: 16.9.1 | ||
|
||
jobs: | ||
lint: | ||
name: Lint code | ||
runs-on: ubuntu-20.04 | ||
env: | ||
DATABASE_USERNAME: postgres | ||
DATABASE_PASSWORD: postgres | ||
DATABASE_HOST: localhost | ||
RAILS_ENV: test | ||
steps: | ||
- uses: actions/checkout@v2.0.0 | ||
with: | ||
fetch-depth: 1 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ env.RUBY_VERSION }} | ||
bundler-cache: true | ||
- uses: actions/setup-node@master | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- run: npm ci | ||
name: Install JS deps | ||
- run: bundle exec rubocop -P | ||
name: Lint Ruby files | ||
- run: bundle exec mdl *.md | ||
name: Lint Markdown files | ||
- run: bundle exec erblint {decidim-census_sms/,decidim-dataviz/,decidim-ephemeral_participation/,decidim-stats/,decidim-valid_auth/}app/{cells,views}/**/*.erb | ||
name: Lint ERB files | ||
- run: npm run stylelint | ||
name: Lint SCSS files | ||
- run: npm run lint | ||
name: Lint JS files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
all | ||
|
||
exclude_rule "first-line-h1" | ||
|
||
exclude_rule "line-length" | ||
|
||
exclude_rule "no-bare-urls" | ||
|
||
exclude_rule "no-inline-html" | ||
|
||
rule "no-trailing-punctuation", punctuation: ".,;:!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
style ".mdl_style.rb" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.