![Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack](https://cdn.sanity.io/images/cgdhsj6q/production/6af25114feaaac7179b18127c83327568ff592d1-1024x1024.webp?w=800&fit=max&auto=format)
Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
@ongov/eslint-config-ontario-frontend
Advanced tools
ESLint configuration for Ontario.ca Frontend projects
Readme
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.
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.
To use the @ongov/eslint-config-ontario-frontend in your project, follow the steps for based on your package manager:
First, you need to install ESLint if it's not already installed:
npm install eslint --save-dev
Next, install the @ongov/eslint-config-ontario-frontend
package:
npm install @ongov/eslint-config-ontario-frontend --save-dev
First, you need to install ESLint if it's not already installed:
pnpm add eslint -D
Next, install the @ongov/eslint-config-ontario-frontend
package:
pnpm add @ongov/eslint-config-ontario-frontend -D
After installation, you'll need to set up your ESLint configuration file if you haven't already. Here's how:
Create a file named .eslintrc.json
in your project's root directory.
Add the following content to .eslintrc.json to extend the @ongov/eslint-config-ontario-frontend configuration:
{
"extends": "@ongov/eslint-config-ontario-frontend"
}
This line tells ESLint to use the @ongov/eslint-config-ontario-frontend
rules for your project.
If you need to override any rules, you can do so within your project's .eslintrc file. For example:
{
"extends": "@ongov/eslint-config-ontario-frontend",
"rules": {
"no-unused-vars": "warn",
"semi": ["error", "never"]
}
}
This customization will change the handling of unused variables to a warning and remove the requirement for semicolons.
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.
Contributions to the Ontario.ca Frontend ESLint Config are welcome. Whether it's bug reports, feature requests, or contributions to code, we appreciate your input.
Check out our CONTRIBUTING.md file for guidelines on how to contribute.
This project is licensed under the Open Government Licence - Ontario. Feel free to use, modify, and distribute it as needed.
We use SemVer for versioning. For the versions available, see the tags on this repository.
FAQs
ESLint configuration for Ontario.ca Frontend projects
The npm package @ongov/eslint-config-ontario-frontend receives a total of 14 weekly downloads. As such, @ongov/eslint-config-ontario-frontend popularity was classified as not popular.
We found that @ongov/eslint-config-ontario-frontend demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.