Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Commit 0435531

Browse files
committed
Add ESLint and Prettier
- Adds in support for ESLint and Prettier
1 parent 5f2bbc5 commit 0435531

File tree

8 files changed

+2938
-399
lines changed

8 files changed

+2938
-399
lines changed

.eslintrc.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
module.exports = {
2+
plugins: ["@typescript-eslint", "prettier"],
3+
ignorePatterns: ["dist/**/*", "**/node_modules/**"],
4+
extends: ["standard-with-typescript", "prettier"],
5+
parser: "@typescript-eslint/parser",
6+
parserOptions: {
7+
tsconfigRootDir: __dirname,
8+
project: true,
9+
},
10+
rules: {
11+
"prettier/prettier": "error",
12+
"@typescript-eslint/naming-convention": "off",
13+
"@typescript-eslint/restrict-template-expressions": "off",
14+
"@typescript-eslint/strict-boolean-expressions": "off",
15+
},
16+
overrides: [
17+
{
18+
files: "**/*.js",
19+
parserOptions: {
20+
project: null,
21+
},
22+
},
23+
{
24+
files: "**/*.spec.ts",
25+
rules: {
26+
"@typescript-eslint/no-dynamic-delete": "off",
27+
"@typescript-eslint/no-var-requires": "off",
28+
},
29+
},
30+
],
31+
root: true,
32+
};

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,22 @@ npm run package
3838

3939
and committing the resulting changes that will be in the `dist/` folder.
4040

41+
### Formatting and linting
42+
43+
This project uses [ESLint](https://eslint.org/) for linting and [Prettier](https://prettier.io/) for source code formatting. You can run the lint checks by running:
44+
45+
```shell
46+
npm run lint
47+
```
48+
49+
If you have lint errors that are automatically fixable, you can fix those by running:
50+
51+
```shell
52+
npm run lint:fix
53+
```
54+
4155
## Releasing
56+
4257
Releases are done by creating a new tag and pushing that tag to the repo. A new
4358
release can be made via the following:
4459

0 commit comments

Comments
 (0)