Skip to content

Commit

Permalink
Merge pull request #3 from beforeyoubid/feature/lint-setup
Browse files Browse the repository at this point in the history
Feature/lint setup
  • Loading branch information
jamesduong-byb authored Nov 21, 2022
2 parents b26116e + ae7361d commit 95c316e
Show file tree
Hide file tree
Showing 26 changed files with 27,091 additions and 108 deletions.
30 changes: 30 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
rules: {
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/interface-name-prefix': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/no-inferrable-types': 0,
'@typescript-eslint/no-empty-interface': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/defined-types-are-used': 0,
'prefer-const': 0,
'@typescript-eslint/ban-ts-ignore': 'off',
},
overrides: [
{
files: ['**/*.stories.*'],
rules: {
'import/no-anonymous-default-export': 'off',
},
},
],
};
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ dist
node_modules
cc-test-reporter
module_test/storage
module_test/yarn.lock
package-lock.json
package-lock.json
coverage
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"semi": true,
"useTabs": false,
"singleQuote": true,
"trailingComma": "es5",
"arrowParens": "avoid",
"printWidth": 120,
"bracketSpacing": true,
"tabWidth": 2,
"proseWrap": "always",
"endOfLine": "lf"
}
6 changes: 5 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
module.exports = {
const config = {
testEnvironment: 'jsdom',
collectCoverage: true,
testPathIgnorePatterns: ['module_test'],
};

module.exports = config;
6 changes: 4 additions & 2 deletions module_test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import {} from '@beforeyoubid/ui-lib';

expect('import', () => {
describe('some test');
describe('import', () => {
describe('some test', () => {
it('', () => {});
});
});
5 changes: 5 additions & 0 deletions module_test/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
2 changes: 2 additions & 0 deletions module_test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
"test": "yarn jest index.test.ts"
},
"devDependencies": {
"@types/jest": "^29.2.2",
"jest": "^29.2.2",
"jest-environment-jsdom": "^29.2.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"ts-jest": "^29.0.3",
"ts-node": "^10.8.2",
"typescript": "4.7.4"
}
Expand Down
3,060 changes: 3,060 additions & 0 deletions module_test/yarn.lock

Large diffs are not rendered by default.

Loading

0 comments on commit 95c316e

Please sign in to comment.