-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1f82ae1
Showing
20 changed files
with
2,599 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Mark this as the root editorconfig file | ||
root = true | ||
|
||
# Base ruleset for all files | ||
[*] | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# Override rules for markdown | ||
[*.md] | ||
# trailing whitespace is significant in markdown -> do not remove | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"extends": ["plugin:prettier/recommended"], | ||
"rules": { | ||
"@typescript-eslint/class-name-casing": "warn", | ||
"@typescript-eslint/semi": "warn", | ||
"no-throw-literal": "warn", | ||
"semi": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
out | ||
node_modules | ||
.vscode-test/ | ||
*.vsix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
trailingComma: 'es5', | ||
tabWidth: 2, | ||
semi: true, | ||
singleQuote: true, | ||
printWidth: 120, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.svn": true, | ||
"**/.hg": true, | ||
"**/CVS": true, | ||
"**/.DS_Store": true, | ||
"node_modules": true, | ||
".vscode": true, | ||
"LICENSE": true | ||
}, | ||
"explorerExclude.backup": null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
out/test/** | ||
src/** | ||
.gitignore | ||
vsc-extension-quickstart.md | ||
**/tsconfig.json | ||
**/.eslintrc.json | ||
**/*.map | ||
**/*.ts | ||
.prettier* | ||
.github/** | ||
.vscodeignore | ||
.eslint* | ||
.editorconfig | ||
DEVELOPMENT.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Changelog | ||
|
||
All notable changes to the vscode-credo-linter extension will be documented in this file. | ||
|
||
## v0.1.0 - 18 October 2020 | ||
|
||
Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Development | ||
|
||
## Install | ||
|
||
```sh | ||
yarn nstall | ||
``` | ||
|
||
## Develop&Debug | ||
|
||
```sh | ||
yarn watch | ||
``` | ||
|
||
select a `.js` file in `out/` and press `F5` | ||
|
||
## Resources | ||
|
||
Unordered list: | ||
|
||
https://github.com/hoovercj/vscode-extension-tutorial | ||
https://github.com/DavidAnson/vscode-markdownlint/blob/main/extension.js | ||
https://code.visualstudio.com/docs/getstarted/settings | ||
https://github.com/DavidAnson/vscode-markdownlint/blob/main/extension.js | ||
https://github.com/prettier/prettier-vscode/blob/3ea86734d1174b5b72646c3a3cea6699f35c8468/src/PrettierEditService.ts | ||
https://github.com/Microsoft/vscode/tree/master/extensions/php | ||
https://github.com/hoovercj/vscode-ruby-linter | ||
https://github.com/salvofid/vscode-eslint/commit/ac5b2e4d950494fac09047b36e1d8632f3b99e57 | ||
https://www.freecodecamp.org/news/node-js-child-processes-everything-you-need-to-know-e69498fe970a/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Adam Zapaśnik | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Credo Linter | ||
|
||
## Features | ||
|
||
Integrates [Credo](https://github.com/rrrene/credo) into VS Code. | ||
|
||
**NOTE:** It also works with a multi-workspace environment. | ||
|
||
## Settings | ||
|
||
This extension contributes the following settings: | ||
|
||
- `credo.enable`: enable/disable this extension | ||
- `credo.command`: credo command that is used to collect problems **DON'T USE FORMAT OPTION** | ||
- `credo.projectDir`: specify mix directory in case Elixir project resides in a subdirectory | ||
- `credo.mixEnv`: MIX_ENV used to run credo, default value is `test`. You shouldn't need to change it. Make sure Credo is available in a `:test` environment. | ||
|
||
## Changelog | ||
|
||
See Changelog [here](CHANGELOG.md) | ||
|
||
## Issues | ||
|
||
Submit the [issues](https://github.com/adamzapasnik/vscode-credo-linter/issues) if you find any bug or have any suggestion. | ||
|
||
## Contribution | ||
|
||
Fork the [repo](https://github.com/adamzapasnik/vscode-credo-linter) and submit pull requests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{ | ||
"name": "credo-linter", | ||
"displayName": "Credo Linter", | ||
"description": "An extension to display credo remarks in vscode.", | ||
"author": "Adam Zapaśnik", | ||
"version": "0.1.0", | ||
"license": "MIT", | ||
"publisher": "adamzapasnik", | ||
"homepage": "https://github.com/adamzapasnik/vscode-credo-linter", | ||
"repository": "https://github.com/adamzapasnik/vscode-credo-linter", | ||
"engines": { | ||
"vscode": "^1.46.0" | ||
}, | ||
"categories": [ | ||
"Linters" | ||
], | ||
"activationEvents": [ | ||
"workspaceContains:**/mix.exs", | ||
"workspaceContains:**/.credo.exs" | ||
], | ||
"main": "./out/extension.js", | ||
"contributes": { | ||
"configuration": { | ||
"type": "object", | ||
"title": "Credo configuration", | ||
"properties": { | ||
"credo.enable": { | ||
"type": "boolean", | ||
"default": true, | ||
"scope": "resource", | ||
"description": "Control whether or not credo is enabled for Elixir files." | ||
}, | ||
"credo.command": { | ||
"type": "string", | ||
"scope": "resource", | ||
"default": "mix credo", | ||
"description": "Credo command (don't use format option)", | ||
"minLength": 1 | ||
}, | ||
"credo.projectDir": { | ||
"scope": "resource", | ||
"type": "string", | ||
"description": "Project dir", | ||
"default": "" | ||
}, | ||
"credo.mixEnv": { | ||
"scope": "resource", | ||
"type": "string", | ||
"description": "Mix environment to use for compilation", | ||
"default": "test", | ||
"minLength": 1 | ||
} | ||
} | ||
} | ||
}, | ||
"scripts": { | ||
"vscode:prepublish": "yarn run compile", | ||
"compile": "tsc -p ./", | ||
"lint": "eslint src --ext ts", | ||
"watch": "tsc -watch -p ./", | ||
"pretest": "yarn run compile && yarn run lint", | ||
"test": "node ./out/test/runTest.js" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"lint-staged": { | ||
"*.{js,ts,css,json,md}": [ | ||
"prettier --write" | ||
], | ||
"*.{js,ts}": [ | ||
"eslint --fix" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@types/glob": "^7.1.1", | ||
"@types/mocha": "^7.0.2", | ||
"@types/node": "^13.11.0", | ||
"@types/vscode": "^1.46.0", | ||
"@typescript-eslint/eslint-plugin": "^2.30.0", | ||
"@typescript-eslint/parser": "^2.30.0", | ||
"eslint": "^6.8.0", | ||
"eslint-config-prettier": "^6.11.0", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"glob": "^7.1.6", | ||
"husky": "^4.2.5", | ||
"lint-staged": "^10.2.11", | ||
"mocha": "^7.1.2", | ||
"prettier": "^2.0.5", | ||
"typescript": "^3.8.3", | ||
"vscode-test": "^1.3.0" | ||
} | ||
} |
Oops, something went wrong.