From 573e08529fbcdd5a9709a15c24b365331612c1b2 Mon Sep 17 00:00:00 2001 From: Stephen Edgar Date: Tue, 16 Feb 2016 14:32:14 +1100 Subject: [PATCH] Normalize eslint with eslint-config-cssnano shared config Closes #5, closes #3 and closes #7. --- .eslintrc | 74 ------------------------------------------ package.json | 6 +++- src/__tests__/index.js | 2 +- 3 files changed, 6 insertions(+), 76 deletions(-) delete mode 100644 .eslintrc diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index d714b4c..0000000 --- a/.eslintrc +++ /dev/null @@ -1,74 +0,0 @@ -root: true - -rules: - brace-style: [2, '1tbs', {allowSingleLine: false}] - camelcase: [2] - comma-spacing: [2] - curly: [2, 'all'] - dot-notation: [2] - eqeqeq: [2] - handle-callback-err: [2] - new-cap: [2] - new-parens: [2] - no-alert: [2] - no-caller: [2] - no-empty: [2] - no-empty-character-class: [2] - no-eval: [2] - no-irregular-whitespace: [2] - no-labels: [2] - no-lonely-if: [2] - no-multiple-empty-lines: [2] - no-new: [2] - no-octal: [2] - no-proto: [2] - no-redeclare: [2] - no-shadow: [2] - no-shadow-restricted-names: [2] - no-sparse-arrays: [2] - no-undef: [2] - no-unused-vars: [2] - no-useless-call: [2] - no-void: [2] - no-warning-comments: [2] - no-with: [2] - object-curly-spacing: [2, 'never'] - quote-props: [2, 'as-needed'] - radix: [2] - semi: [2, 'always'] - semi-spacing: [2] - space-after-keywords: [2, 'always'] - space-before-function-paren: [2, 'always'] - space-before-blocks: [2, 'always'] - space-return-throw-case: [2] - spaced-comment: [2, 'always'] - strict: [2, 'global'] - yoda: [2, 'never'] - -ecmaFeatures: - arrowFunctions: true - binaryLiterals: true - blockBindings: true - classes: true - defaultParams: true - destructuring: true - experimentalObjectRestSpread: true - forOf: true - generators: true - modules: true - objectLiteralComputedProperties: true - objectLiteralDuplicateProperties: true - objectLiteralShorthandMethods: true - objectLiteralShorthandProperties: true - octalLiterals: true - regexUFlag: true - regexYFlag: true - restParams: true - spread: true - superInFunctions: true - templateStrings: true - modules: true - restParams: true - -env: - node: true diff --git a/package.json b/package.json index 32fa200..1939829 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,8 @@ "babel-preset-stage-0": "^6.3.13", "coveralls": "^2.11.6", "del-cli": "^0.2.0", - "eslint": "^1.10.3", + "eslint": "^2.1.0", + "eslint-config-cssnano": "^2.0.0", "nyc": "^6.0.0" }, "homepage": "https://github.com/postcss/postcss-devtools", @@ -53,5 +54,8 @@ }, "ava": { "require": "babel-core/register" + }, + "eslintConfig": { + "extends": "cssnano" } } diff --git a/src/__tests__/index.js b/src/__tests__/index.js index c5c7c2c..ed3976a 100644 --- a/src/__tests__/index.js +++ b/src/__tests__/index.js @@ -14,7 +14,7 @@ let backgroundify = postcss.plugin('backgroundify', () => { let redify = postcss.plugin('redify', () => { return css => { return new Promise(resolve => { - setTimeout(function () { + setTimeout(() => { css.walkDecls(decl => decl.value = 'red'); return resolve(); }, 50);