Skip to content

Commit

Permalink
🌄 Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarber623-cargosense committed May 24, 2024
0 parents commit 732d26d
Show file tree
Hide file tree
Showing 15 changed files with 2,247 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
{
"name": "@cargosense/eslint-config",

// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm install",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"EditorConfig.EditorConfig",
"jasonnutter.vscode-codeowners"
]
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @CargoSense/front-end-reviewers
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
reviewers:
- "CargoSense/front-end-reviewers"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
reviewers:
- "CargoSense/front-end-reviewers"
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI

on:
pull_request:
workflow_call:
workflow_dispatch:

jobs:
test:
name: Node.js ${{ matrix.version }}
runs-on: ubuntu-latest
strategy:
matrix:
version: [18, 20, 22]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}
cache: npm
- run: npm ci
- run: npm test
42 changes: 42 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish

on:
release:
types: [published]

jobs:
ci:
name: CI
uses: ./.github/workflows/ci.yml
publish-to-npm:
name: Publish to npm
permissions:
contents: read
id-token: write
needs: ci
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: https://registry.npmjs.org
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
publish-to-github-packages:
name: Publish to GitHub Packages
permissions:
contents: read
packages: write
needs: ci
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: https://npm.pkg.github.com
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/coverage/
/node_modules/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/iron
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 CargoSense, Inc.

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.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# eslint-config

**Shareable [ESLint](https://eslint.org) configuration.**

[![npm](https://img.shields.io/npm/v/@cargosense/eslint-config.svg?logo=npm&style=for-the-badge)](https://www.npmjs.com/package/@cargosense/eslint-config)
[![Downloads](https://img.shields.io/npm/dt/@cargosense/eslint-config.svg?logo=npm&style=for-the-badge)](https://www.npmjs.com/package/@cargosense/eslint-config)
[![Build](https://img.shields.io/github/actions/workflow/status/CargoSense/eslint-config/ci.yml?branch=main&logo=github&style=for-the-badge)](https://github.com/CargoSense/eslint-config/actions/workflows/ci.yml)

## Installation

```sh
npm install --save-dev @cargosense/eslint-config
```

## Usage

Using [ECMAScript module (ESM)](https://nodejs.org/api/esm.html) syntax:

```js
// eslint.config.js
export { default } from "@cargosense/eslint-config";
```

You may also apply this shared configuration to your project's customized configuration:

```js
// eslint.config.js
import config from "@cargosense/eslint-config";

export default [
...config,

{
"rules": {
// …
},
},
];
```

> [!TIP]
> ESLint is _extremely_ customizable. Refer to [the documentation](https://eslint.org/docs/latest/use/configure/configuration-files) for details.
## License

eslint-config is freely available under the [MIT License](https://opensource.org/licenses/MIT).
7 changes: 7 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* Import package using its full name and configured default export.
*
* @see {@link https://nodejs.org/dist/latest-v20.x/docs/api/packages.html#package-entry-points}
* @see {@link https://nodejs.org/dist/latest-v20.x/docs/api/packages.html#self-referencing-a-package-using-its-name}
*/
export { default } from "@cargosense/eslint-config";
Loading

0 comments on commit 732d26d

Please sign in to comment.