Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Commit

Permalink
feat: add code linting/formatting configs
Browse files Browse the repository at this point in the history
  • Loading branch information
aswanson-nr committed Jan 24, 2022
1 parent 58285b3 commit 35df4c9
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module.exports = {
// https://github.com/newrelic/eslint-plugin-newrelic
extends: [
'plugin:@newrelic/eslint-plugin-newrelic/react',
'plugin:@newrelic/eslint-plugin-newrelic/prettier',
'plugin:jsx-a11y/recommended',
'plugin:react-hooks/recommended',
],
// https://github.com/yannickcr/eslint-plugin-react#configuration
plugins: ['react', 'jsx-a11y', 'markdown'],
settings: {
react: {
version: 'detect',
},
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
env: {
browser: true,
es6: true,
},
ignorePatterns: ['**/__tests__/**/*'],
rules: {
'jsx-a11y/no-onchange': 0,
'no-unused-vars': [
'error',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
ignoreRestSiblings: false,
},
],
},
};
9 changes: 9 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
trailingComma: 'es5',
printWidth: 80,
tabWidth: 2,
semi: true,
singleQuote: true,
jsxSingleQuote: false,
arrowParens: 'always',
};

0 comments on commit 35df4c9

Please sign in to comment.