Skip to content

Commit

Permalink
added stricter linting and prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
wjohnsto committed Jun 17, 2022
1 parent ae7d0ef commit 02463af
Show file tree
Hide file tree
Showing 84 changed files with 6,067 additions and 1,152 deletions.
10 changes: 10 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
dist
node_modules
docs
.github
build
/*.js
/*.ts
/*.d.ts
static
.docusaurus
47 changes: 47 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
module.exports = {
env: {
browser: true,
es6: true,
node: true,
amd: true,
},
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json',
ecmaFeatures: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
},
plugins: ['simple-import-sort'],
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
'@typescript-eslint/unbound-method': 0,
'@typescript-eslint/no-explicit-any': 0,
'no-void': 0,
'import/named': 0,
'import/prefer-default-export': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'jsx-a11y/anchor-is-valid': 0,
'no-console': ['error', { allow: ['warn', 'error', 'debug'] }],
},
settings: {},
ignorePatterns: [
'test/**/*',
'.prettierrc.js',
'jest.config.js',
'jest.setup.ts',
'utils.d.ts',
'utils.js',
'.eslintrc.js',
],
};
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.docusaurus
.github
build
docs
static
10 changes: 10 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
arrowParens: 'always',
bracketSameLine: true,
singleQuote: true,
tabWidth: 2,
semi: true,
trailingComma: 'all',
endOfLine: 'lf',
useTabs: false,
};
Loading

0 comments on commit 02463af

Please sign in to comment.