Skip to content

Commit

Permalink
Added support to eslintignore
Browse files Browse the repository at this point in the history
Earlier the ignore list was obtained from .gitignore file but now those ignore list have been migrated to the .eslintignore since eslint dont support multiple ignore files as of now
  • Loading branch information
Soumesh Banerjee committed Jun 27, 2019
1 parent b4019c4 commit be6d899
Show file tree
Hide file tree
Showing 17 changed files with 3,674 additions and 183 deletions.
2 changes: 2 additions & 0 deletions .bandit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bandit]
exclude: ./node_modules/*,./.git/*
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
out
dist
views/*
!views/espSize.js
3 changes: 2 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,5 @@ statistics = True

exclude =
.git,
__pycache__
__pycache__
node_modules
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ node_modules
*.vsix
!i18n/*/out
package.nls.*.json
*.log
*.log
.DS_Store
bandit_output.txt
flake8_output.txt
25 changes: 3 additions & 22 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ copyright_lint_test:
before_script:
- echo "Skipping before_script"
script:
- cd ci && python copyright_header_checker.py -d ../src ../menuconfig -x ../menuconfig/js/lib -e js ts py
- cd ci && python copyright_header_checker.py -d ../src ../menuconfig -x ../menuconfig/js/lib ../views -e js ts py

typescript_lint_test:
image: electronuserland/builder:11
Expand All @@ -44,26 +44,7 @@ python_lint_test:
image: $CI_DOCKER_REGISTRY/ubuntu-test-env
stage: lint
tags:
- build
artifacts:
when: on_failure
paths:
- flake8_output.txt
- bandit_output.txt
expire_in: 1 week
before_script:
- source /opt/pyenv/activate
- pyenv global 2.7.15
- python -m pip install bandit flake8
script:
- python -m bandit -r -f txt -o bandit_output.txt .
- python -m flake8 --config=.flake8 --output-file=flake8_output.txt --tee

python_lint_test:
image: $CI_DOCKER_REGISTRY/ubuntu-test-env
stage: lint
tags:
- build
- lint
artifacts:
when: on_failure
paths:
Expand All @@ -76,7 +57,7 @@ python_lint_test:
- python -m pip install bandit flake8
script:
- python -m bandit -r -f txt -o bandit_output.txt .
- python -m flake8 --config=.flake8 --output-file=flake8_output.txt --tee
- python -m flake8 --config=.flake8 --output-file=flake8_output.txt --tee

javascript_test:
image: electronuserland/builder:11
Expand Down
8 changes: 8 additions & 0 deletions hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

echo "Pre commit validation...";

npm run tslint
npm run eslint

echo "Success";
Loading

0 comments on commit be6d899

Please sign in to comment.