aboutsummaryrefslogtreecommitdiffstats
path: root/.eslintrc.yaml
diff options
context:
space:
mode:
authorSaivan <savian@me.com>2018-11-25 16:21:53 +1300
committerSaivan <savian@me.com>2018-11-25 16:21:53 +1300
commit62de7d0a1b994b69032a759b796b486e6bc382e3 (patch)
tree112b19f2903b4dc5b4cf61ebef0d021c6ca2f14d /.eslintrc.yaml
parent2b37d7ba5b4267b39c86f9aba5fb14a1b376e846 (diff)
downloadsvg.js-62de7d0a1b994b69032a759b796b486e6bc382e3.tar.gz
svg.js-62de7d0a1b994b69032a759b796b486e6bc382e3.zip
Changed the esLint rules to avoid silly ternary operators, and to let code breathe!
This commit modifies some of the eslint rules, to allow our code to be a little bit more readable. This came about because we had a particularly pesky problem, where the code was indenting ternary operators. This fixes that, and makes it easy to add new rules to eslint as we please in the future. Changes ======= - Rebuilt the library with new eslint rules - Changed the eslintrc file to a yaml file by default
Diffstat (limited to '.eslintrc.yaml')
-rw-r--r--.eslintrc.yaml10
1 files changed, 10 insertions, 0 deletions
diff --git a/.eslintrc.yaml b/.eslintrc.yaml
new file mode 100644
index 0000000..6243075
--- /dev/null
+++ b/.eslintrc.yaml
@@ -0,0 +1,10 @@
+
+extends: standard
+rules:
+ operator-linebreak: [ error, before ]
+ object-curly-spacing: [ error, always ]
+ indent: [ error, 2, {
+ flatTernaryExpressions: true
+ }]
+ padded-blocks: off
+ space-in-parens: [ error, always ]