Skip to content

Commit

Permalink
Merge pull request #16 from aligent/feature/MI-39-support-cjs
Browse files Browse the repository at this point in the history
Revert formatting into the lint step
  • Loading branch information
styler3 authored Nov 19, 2024
2 parents 8c8a48a + d93d6ce commit 9e7eb91
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 40 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,3 @@ jobs:

- name: Run Tests
run: pnpm test

code-quality:
name: 🕵️‍♀️ Code Quality
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}

- name: Fetch target
run: git fetch origin ${{ github.event.pull_request.base.ref }}

- uses: pnpm/[email protected]
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: Install
run: pnpm install

- name: Code Quality Check
run: pnpm format:check
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ export default [
{
settings: { react: { version: '18' } },
},
{
ignores: ['dist/'],
},
];
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,20 @@
],
"scripts": {
"test": "tsc && eslint .",
"build": "rollup -c",
"format": "prettier --ignore-path .prettierignore --check \"**/*.+(js|ts|json)\"",
"format:check": "pnpm run format",
"format:fix": "prettier --ignore-path .prettierignore --write \"**/*.+(js|ts|json)\""
"build": "rollup -c"
},
"dependencies": {
"@eslint/compat": "^1.2.2",
"@eslint/js": "^9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"prettier-plugin-tailwindcss": "^0.6.8",
"typescript-eslint": "^8.13.0"
},
"devDependencies": {
"@types/eslint-config-prettier": "^6.11.3",
"@types/eslint-plugin-jsx-a11y": "^6.9.0",
"@types/eslint__js": "^8.42.3",
"eslint": "^9.14.0",
Expand Down
68 changes: 60 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import eslint from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintPluginPrettier from 'eslint-plugin-prettier/recommended';
import { fixupPluginRules } from '@eslint/compat';
import hooksPlugin from 'eslint-plugin-react-hooks';
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
Expand All @@ -9,7 +9,7 @@ import tsEslint from 'typescript-eslint';
const core = [
eslint.configs.recommended,
...tsEslint.configs.recommended,
eslintConfigPrettier,
eslintPluginPrettier,
{
rules: {
'no-restricted-syntax': [
Expand Down

0 comments on commit 9e7eb91

Please sign in to comment.