Skip to content

Commit

Permalink
feat: initial package publish
Browse files Browse the repository at this point in the history
  • Loading branch information
frontendfixer committed Jul 3, 2023
1 parent 959e703 commit 6d1310a
Show file tree
Hide file tree
Showing 22 changed files with 4,714 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
14 changes: 14 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "frontendfixer/eslint-config-frontendfixer" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release

on:
push:
branches:
- main
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
cache: yarn
node-version: lts/*

- name: Install Dependencies
run: yarn

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
test-code/
.env
ref
.vscode/
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/.git
**/node_modules
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"trailingComma": "es5",
"printWidth": 80,
"quoteProps": "as-needed",
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"bracketSameLine": true,
"jsxBracketSameLine": true,
"jsxSingleQuote": false
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# @frontendfixer/eslint-config-react

## v.1.0.0

### Initial Release

Features of this build

1. Lints JavaScript and TypeScript based on the latest standards
2. Fixes issues and formatting errors with Prettier
3. Lints + Fixes inside of html script tags
4. Lints + Fixes React via eslint-config-airbnb
5. Lints + Fixes Typescript via airbnb/Typescript
6. Lints + Fixes imports according to standard rules
44 changes: 44 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
require('@rushstack/eslint-patch/modern-module-resolution');

module.exports = {
root: true,
env: {
browser: true,
node: true,
commonjs: true,
es6: true,
jquery: true,
jest: true,
},
settings: {
react: {
version: 'detect',
},
},
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
extends: [
'./rules/base.rules',
'eslint:recommended',
'plugin:react/recommended',
'plugin:jsx-a11y/recommended',
'plugin:import/recommended',
'airbnb',
'prettier',
'plugin:prettier/recommended',
],
plugins: [
'html',
'import',
'prettier',
'react',
'react-hooks',
'simple-import-sort',
],
ignorePatterns: ['node_modules/'],
};
77 changes: 77 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"name": "@frontendfixer/eslint-config-react",
"version": "1.0.0",
"description": "ESLint, Prettier and Typescript Config for React application",
"keywords": [
"javascript",
"typescript",
"ecmascript",
"eslint",
"eslint-config",
"lint",
"config",
"prettier",
"react"
],
"repository": {
"type": "git",
"url": "git@github.com:frontendfixer/eslint-config-react.git"
},
"author": {
"name": "Lakshmikanta Patra",
"email": "frontendfixer@gmail.com"
},
"license": "MIT",
"files": [
"index.js",
"typescript.js"
],
"main": "index.js",
"eslintConfig": {
"extends": "./index.js"
},
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"changeset": "changeset",
"release": "changeset publish",
"commit": "git-cz",
"acr": "git add . && pnpm commit && git push --follow-tags"
},
"peerDependencies": {
"eslint": ">=8.0.0",
"prettier": ">=2.0.0",
"typescript": "^5.0.0"
},
"dependencies": {
"@rushstack/eslint-patch": "^1.3.2",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.1",
"eslint-plugin-simple-import-sort": "^10.0.0"
},
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.44.0",
"prettier": "^2.8.8",
"react": "^18.2.0",
"typescript": "^5.1.6"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
Loading

0 comments on commit 6d1310a

Please sign in to comment.