Skip to content

Commit ae77ee2

Browse files
authored
Merge pull request #275 from krvajal/eslint
Eslint
2 parents 92c6884 + 54bc72f commit ae77ee2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+9289
-6915
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.js
2+
test/**/index.ts
3+
test/**/runTest.ts

.eslintrc.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**@type {import('eslint').Linter.Config} */
2+
// eslint-disable-next-line no-undef
3+
module.exports = {
4+
root: true,
5+
parser: '@typescript-eslint/parser',
6+
plugins: ['@typescript-eslint', 'eslint-plugin-jsdoc', 'eslint-plugin-import', 'prettier'],
7+
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
8+
rules: {
9+
'semi': [2, 'always'],
10+
'@typescript-eslint/no-unused-vars': 0,
11+
'@typescript-eslint/no-explicit-any': 0,
12+
'@typescript-eslint/explicit-module-boundary-types': 0,
13+
'@typescript-eslint/no-non-null-assertion': 0,
14+
},
15+
};

.github/workflows/main.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
run: yarn install
1717
- name: Compile
1818
run: yarn compile
19+
- name: Linting
20+
run: yarn lint
1921
- name: Test Syntax Highlighting
2022
run: yarn test:grammar
2123
- name: Test Unittests

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# .prettierignore
2+
3+
node_modules
4+
dist
5+
out

.prettierrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"printWidth": 100,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": true,
7+
"jsxSingleQuote": false,
8+
"quoteProps": "consistent",
9+
"trailingComma": "es5",
10+
"bracketSpacing": true,
11+
"jsxBracketSameLine": false,
12+
"arrowParens": "avoid",
13+
"endOfLine": "lf",
14+
"embeddedLanguageFormatting": "auto"
15+
}

.prettierrc.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

.vscode/extensions.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
3+
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
4+
// List of extensions which should be recommended for users of this workspace.
5+
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"],
6+
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
7+
"unwantedRecommendations": []
8+
}

.vscode/settings.json

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,33 @@
11
// Place your settings in this file to overwrite default and user settings.
22
{
3-
"files.exclude": {
4-
"out": false // set this to true to hide the "out" folder with the compiled JS files
5-
},
6-
"search.exclude": {
7-
"out": true // set this to false to include "out" folder in search results
8-
}
9-
}
3+
"files.exclude": {
4+
"out": false // set this to true to hide the "out" folder with the compiled JS files
5+
},
6+
"search.exclude": {
7+
"out": true // set this to false to include "out" folder in search results
8+
},
9+
"[typescript]": {
10+
"editor.defaultFormatter": "esbenp.prettier-vscode",
11+
"editor.formatOnSave": true
12+
},
13+
"[javascript]": {
14+
"editor.defaultFormatter": "esbenp.prettier-vscode",
15+
"editor.formatOnSave": true
16+
},
17+
"[json]": {
18+
"editor.defaultFormatter": "esbenp.prettier-vscode",
19+
"editor.formatOnSave": true
20+
},
21+
"[jsonc]": {
22+
"editor.defaultFormatter": "esbenp.prettier-vscode",
23+
"editor.formatOnSave": true
24+
},
25+
"[yaml]": {
26+
"editor.defaultFormatter": "esbenp.prettier-vscode",
27+
"editor.formatOnSave": true
28+
},
29+
"[markdown]": {
30+
"editor.defaultFormatter": "esbenp.prettier-vscode"
31+
},
32+
"prettier.configPath": ".prettierrc"
33+
}

.vscode/tasks.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@
4242
"isDefault": true
4343
},
4444
"detail": "setup for test launch"
45-
45+
},
46+
{
47+
"type": "npm",
48+
"script": "lint",
49+
"problemMatcher": "$eslint-stylish",
50+
"label": "npm: lint",
51+
"detail": "eslint . --ext .ts,.tsx"
4652
}
4753
]
4854
}

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
## [2.4.3]
11+
12+
### Changed
13+
14+
- Changed from `tslint` to `eslint` and `prettier` to format ts, json, md files
15+
([#260](https://github.com/krvajal/vscode-fortran-support/issues/260))
16+
1017
## [2.4.2]
1118

1219
### Fixed
@@ -299,7 +306,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
299306

300307
- Initial release
301308

302-
[unreleased]: https://github.com/krvajal/vscode-fortran-support/compare/v2.4.2...HEAD
309+
[unreleased]: https://github.com/krvajal/vscode-fortran-support/compare/v2.4.3...HEAD
310+
[2.4.3]: https://github.com/krvajal/vscode-fortran-support/compare/v2.4.2...v2.4.3
303311
[2.4.2]: https://github.com/krvajal/vscode-fortran-support/compare/v2.4.1...v2.4.2
304312
[2.4.1]: https://github.com/krvajal/vscode-fortran-support/compare/v2.4.0...v2.4.1
305313
[2.4.0]: https://github.com/krvajal/vscode-fortran-support/compare/v2.3.0...v2.4.0

0 commit comments

Comments
 (0)