-
Notifications
You must be signed in to change notification settings - Fork 0
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 e57131b
Showing
14 changed files
with
2,498 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,72 @@ | ||
name: Publish package to registry | ||
|
||
on: | ||
release: | ||
types: | ||
- released | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# | ||
# Checkout repository | ||
# | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# | ||
# Setup Node.js | ||
# | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
# | ||
# Setup PNPM package manager | ||
# | ||
- name: Setup package manager | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
|
||
# | ||
# Install all dependencies | ||
# | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
# | ||
# Configure git user email | ||
# | ||
- name: Configure git user email | ||
run: git config --global user.email "${{ github.event.release.author.email }}" | ||
|
||
# | ||
# Configure git user name | ||
# | ||
- name: Configure git user name | ||
run: git config --global user.name "${{ github.event.release.author.login }}" | ||
|
||
# | ||
# Change package version | ||
# | ||
- name: Change package version | ||
run: pnpm version ${{ github.event.release.tag_name }} | ||
|
||
# | ||
# Build source | ||
# | ||
- name: Build package and bundle source | ||
run: pnpm build | ||
|
||
# | ||
# Publish package to destination registry | ||
# | ||
- name: Publish package to registry | ||
run: pnpm publish --no-git-checks | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
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,112 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
.env.staging | ||
.env.production | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# Next.js build output | ||
.next | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and *not* Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Library | ||
bin/ | ||
|
||
# Visual Studio Code | ||
.vscode/ |
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 @@ | ||
.github/ | ||
|
||
@types/ | ||
|
||
node_modules/ | ||
scripts/ | ||
src/ | ||
|
||
.gitignore | ||
|
||
babel.config.json | ||
eslint.config.mjs | ||
|
||
pnpm-lock.yaml | ||
|
||
tsconfig.json |
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,9 @@ | ||
declare module '@typescript-eslint/parser' | ||
|
||
declare module 'eslint-plugin-import-newlines' | ||
|
||
declare module 'eslint-plugin-import-helpers' | ||
|
||
declare module 'eslint-plugin-jest' | ||
|
||
declare module 'eslint-plugin-unused-imports' |
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,9 @@ | ||
(The MIT License) | ||
|
||
Copyright (c) 2024 X-Spacy <https://x-spacy.com> | ||
|
||
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,17 @@ | ||
## Description | ||
|
||
A eslint config settings for [X-Spacy](https://x-spacy.com). | ||
|
||
## Installation | ||
|
||
```sh | ||
pnpm add @x-spacy/eslint-config -D | ||
``` | ||
|
||
## Quick start | ||
|
||
[Getting started](docs/getting-started.md) | ||
|
||
## License | ||
|
||
[MIT licensed](LICENSE). |
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,8 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-typescript" | ||
], | ||
"plugins": [ | ||
"@babel/plugin-transform-typescript" | ||
] | ||
} |
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 @@ | ||
## Eslint | ||
|
||
ESLint is an open source project that helps you find and fix problems with your JavaScript code. It doesn't matter if you're writing JavaScript in the browser or on the server, | ||
with or without a framework, ESLint can help your code live its best life. | ||
|
||
## Usage | ||
|
||
Create a new file called `eslint.config.(m|c)js` and insert the code below: | ||
|
||
```javascript | ||
import config from '@x-spacy/eslint-config'; | ||
|
||
export default config; | ||
``` |
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,3 @@ | ||
import rules from './dist/index.js'; | ||
|
||
export default rules; |
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,58 @@ | ||
{ | ||
"name": "@x-spacy/eslint-config", | ||
"version": "0.0.0", | ||
"description": "ESLint configuration used by X-Spacy.", | ||
"license": "MIT", | ||
"private": false, | ||
"main": "dist/index.js", | ||
"type": "module", | ||
"author": { | ||
"name": "Vinícius Gutierrez da Silva Rocha", | ||
"email": "srgutyerrez@gmail.com", | ||
"url": "https://github.com/gutyerrez" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/x-spacy/eslint-config.git" | ||
}, | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org", | ||
"access": "public", | ||
"tag": "latest" | ||
}, | ||
"engines": { | ||
"node": "v20.x.x" | ||
}, | ||
"scripts": { | ||
"build": "sh scripts/build.sh" | ||
}, | ||
"dependencies": { | ||
"@typescript-eslint/eslint-plugin": "^7.9.0", | ||
"@typescript-eslint/parser": "^7.9.0", | ||
"@typescript-eslint/utils": "^7.10.0", | ||
"eslint-plugin-import-helpers": "^1.3.1", | ||
"eslint-plugin-import-newlines": "^1.4.0", | ||
"eslint-plugin-jest": "^28.5.0", | ||
"eslint-plugin-unused-imports": "^3.2.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.24.5", | ||
"@babel/core": "^7.24.5", | ||
"@babel/plugin-transform-typescript": "^7.24.5", | ||
"@babel/preset-typescript": "^7.24.1", | ||
"eslint": "^9.3.0", | ||
"typescript": "^5.4.5" | ||
}, | ||
"peerDependencies": { | ||
"eslint": "^8.57.0", | ||
"typescript": "^5.4.5" | ||
}, | ||
"peerDependenciesMeta": { | ||
"typescript": { | ||
"optional": false | ||
}, | ||
"jest": { | ||
"optional": false | ||
} | ||
} | ||
} |
Oops, something went wrong.