@ongov/eslint-config-ontario-frontend
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "@ongov/eslint-config-ontario-frontend", | ||
"version": "1.0.0", | ||
"description": "ESLint configuration for Ontario Frontend projects", | ||
"version": "1.0.1", | ||
"description": "ESLint configuration for Ontario.ca Frontend projects", | ||
"keywords": [ | ||
@@ -15,3 +15,3 @@ "prettier", | ||
], | ||
"author": "Ontario Frontend", | ||
"author": "Ontario.ca Frontend", | ||
"license": "Apache-2.0", | ||
@@ -18,0 +18,0 @@ "main": "lib/.eslintrc.js", |
# @ongov/eslint-config-ontario-frontend | ||
This package provides the shared ESLint configuration used by Ontario Frontend projects. It enforces a consistent code style for JavaScript projects to help keep code clean and readable. | ||
This package provides the shared ESLint configuration used by Ontario.ca Frontend projects. It enforces a consistent code style for JavaScript projects to help keep code clean and readable. | ||
## Features | ||
- **Print Width**: Set to 80 characters to maintain readability across various devices and editors. | ||
- **Tab Width**: Uses 2 spaces for indentation to ensure code is clean and readable. | ||
- **Print width**: Set to 80 characters to maintain readability across various devices and editors. | ||
- **Tab width**: Uses 2 spaces for indentation to ensure code is clean and readable. | ||
- **Semicolons**: Requires semicolons at the end of statements for clarity. | ||
- **Single Quotes**: Enforces the use of single quotes for strings, except in Markdown files where double quotes are preferred. | ||
- **Trailing Commas**: Requires trailing commas in multi-line objects, arrays, etc., which makes version control diffs cleaner. | ||
- **Bracket Spacing**: Ensures spaces are present inside object literal braces for better readability. | ||
- **Bracket Same Line**: Places the closing angle bracket of elements on the same line as the last prop. | ||
- **Overrides for Markdown**: For `.md` files, double quotes are used instead of single quotes. | ||
- **Single quotes**: Enforces the use of single quotes for strings, except in Markdown files where double quotes are preferred. | ||
- **Trailing commas**: Requires trailing commas in multi-line objects, arrays, etc., which makes version control diffs cleaner. | ||
- **Bracket spacing**: Ensures spaces are present inside object literal braces for better readability. | ||
- **Bracket same line**: Places the closing angle bracket of elements on the same line as the last prop. | ||
- **Overrides for markdown**: For `.md` files, double quotes are used instead of single quotes. | ||
## Installation | ||
@@ -20,29 +27,29 @@ | ||
### NPM | ||
### Using npm | ||
1. First, you need to install [ESLint](http://eslint.org) if it's not already installed: | ||
```sh | ||
npm install eslint --save-dev | ||
``` | ||
```sh | ||
npm install eslint --save-dev | ||
``` | ||
2. Next, install the `@ongov/eslint-config-ontario-frontend` package: | ||
```sh | ||
npm install @ongov/eslint-config-ontario-frontend --save-dev | ||
``` | ||
```sh | ||
npm install @ongov/eslint-config-ontario-frontend --save-dev | ||
``` | ||
### PNPM | ||
### Using pnpm | ||
1. First, you need to install [ESLint](http://eslint.org) if it's not already installed: | ||
```sh | ||
pnpm add eslint -D | ||
``` | ||
```sh | ||
pnpm add eslint -D | ||
``` | ||
2. Next, install the `@ongov/eslint-config-ontario-frontend` package: | ||
```sh | ||
pnpm add @ongov/eslint-config-ontario-frontend -D | ||
``` | ||
```sh | ||
pnpm add @ongov/eslint-config-ontario-frontend -D | ||
``` | ||
@@ -57,7 +64,7 @@ ## Usage | ||
```json | ||
{ | ||
"extends": "@ongov/eslint-config-ontario-frontend" | ||
} | ||
``` | ||
```json | ||
{ | ||
"extends": "@ongov/eslint-config-ontario-frontend" | ||
} | ||
``` | ||
@@ -84,7 +91,7 @@ This line tells ESLint to use the `@ongov/eslint-config-ontario-frontend` rules for your project. | ||
Explore the Documentation to learn about every aspect of the toolkit--from installation and file structure to adding analytics and preparing for deployment. The documentation is available at [our dev site](our dev site). | ||
Explore the documentation to learn about every aspect of the toolkit--from installation and file structure to adding analytics and preparing for deployment. The documentation is available at [developer.ontario.ca](https://developer.ontario.ca). | ||
## Contributing | ||
Contributions to the [Ontario Frontend ESLint Config](https://github.com/ongov/ontario-frontend/tree/main/packages/eslint-config-ontario-frontend) are welcome! Whether it's bug reports, feature requests, or contributions to code, we appreciate your input. | ||
Contributions to the [Ontario.ca Frontend ESLint Config](https://github.com/ongov/ontario-frontend/tree/main/packages/eslint-config-ontario-frontend) are welcome. Whether it's bug reports, feature requests, or contributions to code, we appreciate your input. | ||
@@ -91,0 +98,0 @@ Check out our [CONTRIBUTING.md](https://github.com/ongov/ontario-frontend/tree/main/CONTRIBUTING.md) file for guidelines on how to contribute. |
14472
4
104