Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint #20

Merged
merged 9 commits into from
Nov 17, 2018
17 changes: 17 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (C) 2018-present Arctic Ice Studio <[email protected]>
# Copyright (C) 2018-present Sven Greb <[email protected]>
#
# Project: Nord Docs
# Repository: https://github.com/arcticicestudio/nord-docs
# License: MIT

.cache/*
build/*
content/*
**/node_modules/*
public/*
static/*
!.gatsby
!.eslintrc.js
!.huskyrc.js
!.remarkrc.js
51 changes: 51 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright (C) 2018-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2018-present Sven Greb <[email protected]>
*
* Project: Nord Docs
* Repository: https://github.com/arcticicestudio/nord-docs
* License: MIT
*/

/**
* @file The ESLint configuration.
* @author Arctic Ice Studio <[email protected]>
* @author Sven Greb <[email protected]>
* @see https://github.com/babel/eslint-plugin-babel#rules
* @see https://github.com/tc39/proposal-optional-chaining
*/

const { resolve } = require("path");

module.exports = {
extends: "arcticicestudio",
plugins: ["babel"],
parser: "babel-eslint",
env: {
browser: true,
node: true
},
settings: {
"import/resolver": {
node: {
/* Resolve Webpack alias imports */
paths: [resolve(__dirname, "src"), resolve(__dirname, "src/components")]
}
}
},
rules: {
"no-confusing-arrow": "off",
/* Suppress errors when importing development dependencies */
"import/no-extraneous-dependencies": ["error", { devDependencies: ["./.gatsby/**/*.js"] }],
/*
* Enable support for experimental features:
*
* - `babel/camelcase` - doesn't complain about optional chaining (`let foo = bar?.a_b;`).
* - `babel/no-unused-expressions` - doesn't fail when using `do` expressions or optional chaining (`a?.b()`).
*/
"babel/camelcase": "error",
camelcase: "off",
"babel/no-unused-expressions": "error",
"no-unused-expressions": "off"
}
};
Loading