Skip to content

Commit

Permalink
Codeclimate: rely on eslint 5 to avoid build errors (#12632)
Browse files Browse the repository at this point in the history
* Codeclimate: run eslint 5

This may help solve current errors when trying to run Codeclimate tests.

* Rely on Codeclimate prepare to extract our config into base file

This will allow us to make our CodeClimate config available to other repos.

See comment at the top of the file to see how this can be used.

* Update CodeClimate base file.

See https://github.com/Automattic/jetpack/pull/12632/files#r292177003
  • Loading branch information
jeherve committed Jun 10, 2019
1 parent 1e457b7 commit 8702b62
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 56 deletions.
61 changes: 5 additions & 56 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,6 @@
---
engines:
csslint:
enabled: true
duplication:
enabled: true
config:
languages:
- javascript
- php
fixme:
enabled: true
phpcodesniffer:
enabled: true
config:
standard: "WordPress"
phpmd:
enabled: true
eslint:
enabled: true
channel: "eslint-2"
scss-lint:
enabled: true
markdownlint:
enabled: true
ratings:
paths:
- "**.css"
- "**.scss"
- "**.inc"
- "**.js"
- "**.jsx"
- "**.php"
- "**.md"
exclude_paths:
- "**/.github/**"
- "**/tests/**"
- "**.png"
- "**.jpg"
- "**.gif"
- "gulpfile.js"
- "composer.lock"
- ".phpcs.xml.dist"
- "**.json"
- "**.jshintrc"
- "**.jshintignore"
- "**.svnignore"
- "**.travis.yml"
- "**.gitignore"
- "**.eslintrc.js"
- "**.editorconfig"
- "**.pot"
- "**.txt"
- "**-min.js"
- "**-min.css"
- "**.dist"
- "**.sh"
prepare:
fetch:
- url: "https://raw.githubusercontent.com/automattic/jetpack/master/.github/codeclimate-base.yml"
path: "codeclimate-base.yml"

69 changes: 69 additions & 0 deletions .github/codeclimate-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Basic configuration for CodeClimate.
# This basic configuration can then be used and extended up in other repositories,
# or in this one, using the prepare step:
# https://docs.codeclimate.com/docs/configuring-the-prepare-step
#
# Here is how your codeclimate file extending Jetpack's one should look like:
# prepare:
# fetch:
# - url: "https://raw.githubusercontent.com/automattic/jetpack/master/.github/codeclimate-base.yml"
# path: "codeclimate-base.yml"
---
engines:
csslint:
enabled: true
duplication:
enabled: true
config:
languages:
- javascript
- php
fixme:
enabled: true
phpcodesniffer:
enabled: true
config:
standard: "WordPress"
phpmd:
enabled: true
eslint:
enabled: true
channel: "eslint-5"
config:
config: "/.eslintrc.js"
scss-lint:
enabled: true
markdownlint:
enabled: true
ratings:
paths:
- "**.css"
- "**.scss"
- "**.inc"
- "**.js"
- "**.jsx"
- "**.php"
- "**.md"
exclude_paths:
- "**/.github/**"
- "**/tests/**"
- "**.png"
- "**.jpg"
- "**.gif"
- "gulpfile.js"
- "composer.lock"
- ".phpcs.xml.dist"
- "**.json"
- "**.jshintrc"
- "**.jshintignore"
- "**.svnignore"
- "**.travis.yml"
- "**.gitignore"
- "**.eslintrc.js"
- "**.editorconfig"
- "**.pot"
- "**.txt"
- "**-min.js"
- "**-min.css"
- "**.dist"
- "**.sh"

0 comments on commit 8702b62

Please sign in to comment.