generated from stratosphereips/awesome-code-template
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from HolecekM/lint-and-format
Lint and format
- Loading branch information
Showing
22 changed files
with
2,119 additions
and
65 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
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 @@ | ||
v20 |
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,25 @@ | ||
# StratoCyberLab Dashboard - Client | ||
|
||
## Development | ||
|
||
- `npm ci` to install dependencies | ||
- `npm run dev` to run the development server (with hot reload) | ||
- `npm run build` to build (this is done when building the Docker image) | ||
|
||
## Code Quality | ||
|
||
Before committing your changes, please make sure they do not generate new | ||
warnings (contain lints) and the code is properly formatted. | ||
|
||
### Linting | ||
|
||
We use [ESLint](https://eslint.org/) to check client code for lints. | ||
You can either use IDE integration (make sure your IDE supports ESLint **9**) or | ||
the command `npx eslint src` (in this directory) to run code analysis. | ||
|
||
### Formatting | ||
|
||
[Prettier](https://prettier.io/) is used for on-the-fly formatting. | ||
We recommend enabling automatic formatting on save using your IDE. | ||
You can also run the command `npx prettier -w src` (in this directory) to | ||
reformat all code. |
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 @@ | ||
import eslintPluginSvelte from 'eslint-plugin-svelte'; | ||
import js from '@eslint/js'; | ||
import globals from 'globals'; | ||
|
||
export default [ | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
}, | ||
}, | ||
}, | ||
js.configs.recommended, | ||
{ | ||
rules: { | ||
'no-throw-literal': 'error', | ||
} | ||
}, | ||
...eslintPluginSvelte.configs['flat/recommended'], | ||
{ | ||
files: ['!src/**/*'], | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
} | ||
]; |
Oops, something went wrong.