Skip to content

Commit

Permalink
Replaced TSLint with ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
DConnorFong committed Oct 20, 2020
1 parent f0d6fc0 commit 794c00b
Show file tree
Hide file tree
Showing 12 changed files with 1,640 additions and 1,410 deletions.
9 changes: 9 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.vscode

node_modules

dist

build

coverage
21 changes: 21 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
extends: [
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
env: {
commonjs: true,
es6: true,
node: true,
},
rules: {
// New rules can be inserted here to override some default configurations
},
};
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ build/Release
node_modules/
jspm_packages/

# Lets restrict to one lock file (Yarn)
package-lock.json


# TypeScript v1 declaration files
typings/

Expand Down
8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

8 changes: 8 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
endOfLine: "lf",
printWidth: 120,
semi: true,
singleQuote: true,
tabWidth: 4,
trailingComma: "all"
}
10 changes: 9 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
{
"editor.formatOnSave": true
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
},
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
],
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You will also see any lint errors in the console.

### `yarn lint`

Runs TSLint to ensure that your code is conforming to standards.
Runs ESLint to ensure that your code is conforming to standards.

### `yarn test`

Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@
]
},
"devDependencies": {
"prettier": "^2.1.2",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.3.0"
"@typescript-eslint/eslint-plugin": "^4.5.0",
"@typescript-eslint/parser": "^4.5.0",
"eslint-config-prettier": "^6.13.0",
"eslint-plugin-prettier": "^3.1.4",
"prettier": "^2.1.2"
}
}
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import './App.css';

function App() {
const App: React.FunctionComponent = () => {
return (
<div className="App">
<h1>Club Manager</h1>
{/* TODO: implement React Router and link it to new views*/}
</div>
);
}
};

export default App;
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
document.getElementById('root'),
);
21 changes: 0 additions & 21 deletions tslint.json

This file was deleted.

Loading

0 comments on commit 794c00b

Please sign in to comment.