Skip to content

Commit

Permalink
Merge pull request #2 from affinityproject/feat/small-tweaks/dev
Browse files Browse the repository at this point in the history
Use affinityproject eslint and prettier configs and other tweaks
  • Loading branch information
JaceHensley authored Jun 15, 2020
2 parents d187b44 + 8133f2e commit 2101b5f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 37 deletions.
4 changes: 3 additions & 1 deletion generate
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ cp -rvf "$GENERATOR_DIR"/template/* "$GENERATOR_DIR"/template/.* "$CLIENT_DIR/"

pushd "$CLIENT_DIR"
npm install --save axios '@types/axios'
npm install --save-dev '@affinityproject/eslint-config' '@affinityproject/prettier-config' '@typescript-eslint/eslint-plugin' '@typescript-eslint/parser' eslint eslint-config-prettier eslint-plugin-prettier prettier
npx prettier --write ./src/**/*.ts
tsdx lint src test --fix
npm run lint -- src test --fix
rm -f yarn.lock
rm -rf test
npm run build
14 changes: 4 additions & 10 deletions template/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
module.exports = {
extends: ['@affinityproject/eslint-config'],
rules: {
'@typescript-eslint/no-unused-vars': ['off'],
'@typescript-eslint/consistent-type-assertions': ['off'],
'@typescript-eslint/consistent-type-assertions': ['off'],
'@typescript-eslint/interface-name-prefix': [
'off',
{
prefixWithI: 'always',
},
],
'@typescript-eslint/no-namespace': ['off', {allowDeclarations: false, allowDefinitionFiles: false}],
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
'no-unused-vars': 'off',
},
}
2 changes: 1 addition & 1 deletion template/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@bloomprotocol/prettier-config')
module.exports = require('@affinityproject/prettier-config')
9 changes: 0 additions & 9 deletions template/tsconfig-paths.js

This file was deleted.

7 changes: 0 additions & 7 deletions template/tsconfig.build.json

This file was deleted.

12 changes: 3 additions & 9 deletions template/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"include": ["src", "types", "test"],
"compilerOptions": {
"target": "es5",
"module": "esnext",
"lib": ["dom", "esnext"],
"importHelpers": true,
"declaration": true,
"sourceMap": true,
"outDir": "build",
"rootDir": "./src",
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
Expand All @@ -20,14 +19,9 @@
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"*": ["node_modules/*"],
".*": ["src/*"],
"@src/*": ["src/*"]
},
"jsx": "react",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true
}
},
"include": ["src"]
}

0 comments on commit 2101b5f

Please sign in to comment.