From 1e87dfdb6b179587f52eee8145ce98bbee25730c Mon Sep 17 00:00:00 2001 From: Simon Reinsperger Date: Tue, 7 Mar 2017 16:12:39 +0100 Subject: [PATCH] feat: eslint config (airbnb), adds cache option for lint npm script --- .eslintrc | 8 ++++++++ .gitignore | 2 ++ package.json | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .eslintrc diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..99f7c65 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,8 @@ +{ + "extends": "airbnb", + "plugins": [ + "react", + "jsx-a11y", + "import" + ] +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index a312296..13532a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ node_modules/ +npm-debug.log + public .gatsby-context.js diff --git a/package.json b/package.json index 0f22038..638e3c4 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "clean": "npm run clean:public", "copy:files": "find ./pages -maxdepth 1 -type f -regextype posix-extended -regex '.+\\.(pdf|txt|png|jpg|jpeg|gif)$' -exec cp -v {} ./public ';'", "copy": "npm run copy:files", - "lint": "./node_modules/.bin/eslint --ext .js,.jsx --ignore-pattern public .", + "lint": "./node_modules/.bin/eslint --cache --ext .js,.jsx --ignore-pattern public .", "test": "echo \"Error: no test specified\" && exit 1", "deploy": "gatsby build --prefix-links && gh-pages -d public" },