aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Hiar <codyfh@gmail.com>2017-03-03 14:34:39 -0700
committerCody Hiar <codyfh@gmail.com>2017-03-03 14:34:39 -0700
commit82a4453b2941905ae3e7e7f73620fb52f587a7a9 (patch)
treec69e021834beb9a1a9a2667bdd0476254f2ea269
parenteaaca2d462191b69db715ce972eb40736c94e2d0 (diff)
Adding jsavascript and sass linting
-rw-r--r--Dockerfile15
-rw-r--r--eslintrc.js14
-rw-r--r--sass-lint.yaml87
3 files changed, 116 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
index e1bf6e8..8248e8d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -73,6 +73,21 @@ COPY package/lib/ /usr/local/lib/
RUN ldconfig /usr/local/lib
########################################
+# Javscript
+########################################
+# Install nodejs linting
+# Install JS linting modules
+# Install sass linting
+RUN npm install -g \
+ eslint@\^3.14.0 eslint-config-airbnb-base eslint-plugin-import eslint-plugin-vue \
+ sass-lint@\^1.10.2
+# Install the eslintrc.js
+ADD eslintrc.js /root/.eslintrc.js
+# Install the sass-lint.yaml
+ADD sass-lint.yaml /root/.sass-lint.yaml
+
+
+########################################
# Personalizations
########################################
# Add some aliases
diff --git a/eslintrc.js b/eslintrc.js
new file mode 100644
index 0000000..477d021
--- /dev/null
+++ b/eslintrc.js
@@ -0,0 +1,14 @@
+module.exports = {
+ 'root': true,
+ 'extends': 'airbnb-base',
+ 'globals': {
+ 'window': true,
+ 'document': true,
+ 'jQuery': false,
+ '$': true,
+ 'Foundation': true
+ },
+ 'rules': {
+ 'max-len': ['error', 120]
+ }
+}
diff --git a/sass-lint.yaml b/sass-lint.yaml
new file mode 100644
index 0000000..ebd9552
--- /dev/null
+++ b/sass-lint.yaml
@@ -0,0 +1,87 @@
+options:
+ formatter: stylish
+files:
+ include: '**/*.s+(a|c)ss'
+rules:
+ # Extends
+ extends-before-mixins: 1
+ extends-before-declarations: 1
+ placeholder-in-extend: 0
+
+ # Mixins
+ mixins-before-declarations: 1
+
+ # Line Spacing
+ one-declaration-per-line: 1
+ empty-line-between-blocks: 1
+ single-line-per-selector: 1
+
+ # Disallows
+ no-color-keywords: 1
+ no-color-literals: 0
+ no-css-comments: 1
+ no-debug: 1
+ no-duplicate-properties: 1
+ no-empty-rulesets: 1
+ no-extends: 0
+ no-ids: 1
+ no-important: 0
+ no-invalid-hex: 1
+ no-mergeable-selectors: 0
+ no-misspelled-properties: 0
+ no-qualifying-elements: 1
+ no-trailing-zero: 1
+ no-transition-all: 0
+ no-url-protocols: 1
+ no-vendor-prefixes: 0
+ no-warn: 1
+ property-units: 0
+
+ # Nesting
+ force-attribute-nesting: 1
+ force-element-nesting: 1
+ force-pseudo-nesting: 0
+
+ # Name Formats
+ class-name-format: 0
+
+ function-name-format: 1
+ id-name-format: 0
+ mixin-name-format: 1
+ placeholder-name-format: 1
+ variable-name-format: 0
+
+ # Style Guide
+ bem-depth: 0
+ border-zero: 1
+ brace-style: 1
+ clean-import-paths: 0
+ empty-args: 1
+ hex-length: 1
+ hex-notation: 1
+ indentation: 0
+ leading-zero:
+ - 1
+ -
+ include: true
+ nesting-depth: 1
+ property-sort-order: 0
+ quotes: 1
+ shorthand-values: 1
+ url-quotes: 1
+ variable-for-property: 1
+ zero-unit: 1
+
+ # Inner Spacing
+ space-after-comma: 1
+ space-before-colon: 0
+ space-after-colon: 1
+ space-before-brace: 1
+ space-before-bang: 1
+ space-after-bang: 1
+ space-between-parens: 1
+ space-around-operator: 1
+
+ # Final Items
+ trailing-semicolon: 1
+ final-newline: 1