Skip to content

Commit

Permalink
feat: add linters
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Aug 14, 2023
1 parent 2aca18d commit b35e525
Show file tree
Hide file tree
Showing 82 changed files with 20,296 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
console.log('Compiling typescript files by tsconfig...');

/**
* @type {import('eslint').Linter.Config}
*/
module.exports = {
root: true,
extends: [
'plugin:@taiga-ui/eslint-plugin/eslint-config',
'plugin:@taiga-ui/eslint-plugin/eslint-config-angular-recommended',
'plugin:@taiga-ui/eslint-plugin/eslint-config-angular-rxjs',
'plugin:@taiga-ui/eslint-plugin/eslint-config-angular-imports',
'plugin:@taiga-ui/eslint-plugin/eslint-config-angular-promise',
'plugin:@taiga-ui/eslint-plugin/eslint-config-angular-unicorn',
'plugin:@taiga-ui/eslint-plugin/eslint-config-angular-html-eslint',
'plugin:@taiga-ui/eslint-plugin/eslint-config-angular-file-progress',
'plugin:@taiga-ui/eslint-plugin/eslint-config-angular-line-statements',
'plugin:@taiga-ui/eslint-plugin/eslint-config-angular-member-ordering',
'plugin:@taiga-ui/eslint-plugin/eslint-config-angular-decorator-position',
'plugin:@taiga-ui/eslint-plugin/eslint-config-angular-experimental',
'plugin:@taiga-ui/eslint-plugin/eslint-config-angular-function-return-type',
'plugin:@taiga-ui/eslint-plugin/taiga',
'plugin:@taiga-ui/eslint-plugin/no-restricted-syntax',
'plugin:@taiga-ui/eslint-plugin/typescript',
'plugin:@taiga-ui/eslint-plugin/ng',
'plugin:@taiga-ui/eslint-plugin/cypress',
'plugin:@taiga-ui/eslint-plugin/naming-convention',
'plugin:@taiga-ui/eslint-plugin/off',
],
ignorePatterns: require('@taiga-ui/eslint-plugin/configs/ignore-patterns'),
};
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: 🐞 Bug report
about: Create a report to help us improve
title: '[BUG] '
labels: ''
assignees: waterplea
---

# 🐞 Bug report

### Description

<!-- A clear and concise description of what the bug is -->

### Reproduction

<!-- Steps to reproduce or, preferably, a demo on StackBlitz or similar service -->

http://www.stackblitz.com/...

### Expected behavior

<!-- A clear and concise description of what you expected to happen -->

### Versions

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Angular [e.g. 8]

### Additional context

<!-- Add any other context about the problem here -->
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: 🚀 Feature request
about: Suggest an idea for this project
title: '[FEATURE]'
labels: ''
assignees: waterplea
---

# 🚀 Feature request

### Is your feature request related to a problem?

<!-- A clear and concise description of what the problem is. Ex. -->
<!-- ✍️edit: --> I'm always frustrated when...

### Describe the solution you'd like

<!-- A clear and concise description of what you want to happen -->
<!-- ✍️edit: -->

### Describe alternatives you've considered

<!-- A clear and concise description of any alternative solutions or features you've considered -->
<!-- ✍️edit: -->

### Additional context

<!-- Add any other context or screenshots about the feature request here -->
<!-- ✍️edit: -->
35 changes: 35 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## PR Checklist

Please check if your PR fulfills the following requirements:

- [ ] The commit message follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/)
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)

## PR Type

What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->

- [ ] Bugfix
- [ ] Feature
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Other... Please describe:

## What is the current behavior?

<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->

Issue Number: N/A

## What is the new behavior?

## Does this PR introduce a breaking change?

- [ ] Yes
- [ ] No

<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->

## Other information
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ⚙️ Lint

on:
pull_request:
push:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.3
- uses: taiga-family/ci/actions/setup-node@1.9.0

- run: |
npm run prettier -- --check
npm run stylelint -- --check
npm run lint
concurrency:
group: lint-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: ⚠️ Release
on:
workflow_dispatch:
inputs:
forcePush:
type: boolean
required: false
description: --force-publish package
mode:
type: choice
description: force package to be versioned (depend --force-publish)
required: false
default: minor
options:
- patch
- minor
- major

jobs:
run-release:
name: Run release
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}
steps:
- uses: actions/checkout@v3.5.3
with:
fetch-depth: 0
persist-credentials: false
ref: ${{ github.head_ref }}
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}
- uses: taiga-family/ci/actions/setup-node@1.7.6
- uses: taiga-family/ci/actions/setup-git@1.7.6
with:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}
- uses: taiga-family/ci/actions/setup-npm@1.7.6
with:
token: ${{ secrets.NPM_TOKEN }}

- name: Lerna update version of packages
if: always()
run: |
if [[ ${{ github.event.inputs.forcePush }} == "true" ]]; then
npx lerna version ${{ github.event.inputs.mode }} --no-private --force-publish
else
npx lerna version --no-private
fi
- name: Publish
if: always()
run: npx nx run-many --target publish --all --output-style=stream

concurrency:
group: release-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
40 changes: 40 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
*.log
lib-cov
coverage
build/Release
**/node_modules/
npm-debug.log
/npm-debug.log.*
/coverage/
*/dist
/src/*/__build__/
/__build__/**
/public/dist/
/src/*/dist/
/dist/**
.webpack.json
/compiled/
dll/
tmp/
*.ngfactory.ts
*.css.shim.ts
*.ngsummary.json
*.shim.ngstyle.ts
.idea
*.iml
*/tmp
.rpt2_cache
.vscode
quality-check
.DS_Store
dist
**/cypress/screenshots
**/cypress/snapshots
.ssl
RELEASE_BODY.md
*tsbuildinfo
.angular
/projects/demo-playwright/tests-results/
/projects/demo-playwright/tests-report/
/projects/demo-playwright/snapshots/
/projects/demo-playwright/playwright/.cache/
6 changes: 6 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
legacy-peer-deps=true # TODO: remove this line in v4.0
strict-ssl=false # Fix problem when downloading cypress binary
ca = ''
unsafe-perm=true
engine-strict=true
audit=false
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.idea
dist
**/coverage/**
package-lock.json
35 changes: 35 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "independent",
"packages": ["projects/*"],
"concurrency": 1,
"stream": true,
"npmClient": "npm",
"changelog": true,
"private": false,
"conventionalCommits": true,
"ignoreChanges": [
"**/node_modules/**",
"**/dist/**",
"**/tests/**",
"**/*.spec.ts",
"**/apps/**",
"**/.github/**",
"**/scripts/**",
"**/CHANGELOG.md",
"**/project.json",
"**/ng-packages.json"
],
"command": {
"version": {
"allowBranch": "main",
"commitHooks": false,
"createRelease": "github"
},
"publish": {
"yes": true,
"registry": "https://registry.npmjs.org",
"message": "chore(release): update CHANGELOG.md [ci skip]"
}
}
}
30 changes: 30 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"implicitDependencies": {
"package.json": {
"dependencies": "*",
"devDependencies": "*"
},
"package-lock.json": "*",
"nx.json": "*",
"tsconfig.*.json": "*",
"tsconfig.json": "*",
"*.yml": "*",
"*.md": "*"
},
"tasksRunnerOptions": {
"default": {
"runner": "nx-cloud",
"options": {
"cacheableOperations": ["test", "build"],
"parallel": 1
}
}
},
"affected": {
"defaultBase": "origin/main"
},
"workspaceLayout": {
"libsDir": "projects",
"appsDir": "projects"
}
}
Loading

0 comments on commit b35e525

Please sign in to comment.