Skip to content

Commit

Permalink
chore: enable linter (refinedev#5210)
Browse files Browse the repository at this point in the history
* chore: enable linter in CI

* chore: fix lint issues

* fix: remove conflicting eslint-plugin-prettier and update prettier to v3

* fix: hoisting issue

* chore: revert packages changes

* chore: revert examples changes

* fix: bootstrap issue with prettier version

* chore: use prettier 2.7.1

* chore: update snapshots

---------

Co-authored-by: Ömer Faruk APLAK <[email protected]>
  • Loading branch information
BatuhanW and Ömer Faruk APLAK authored Nov 6, 2023
1 parent 962e6a4 commit f0563cf
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 208 deletions.
6 changes: 3 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
},
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"plugins": ["@typescript-eslint"],
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
"prettier"
],
"overrides": [
{
Expand All @@ -26,9 +26,9 @@
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"prettier/prettier": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/master-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
npm ci
npm run bootstrap:all
npm run build:all
#- name: Lint
# run: npm run lint
- name: Lint
run: npm run lint
- name: Test
run: npm run test:all
- name: Create Release Pull Request or Publish to npm
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
#lint:
# runs-on: ubuntu-latest
# name: Lint
# steps:
# - uses: actions/checkout@v3
# - name: lint
# run: |
# npm ci
# npm run lint
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- uses: actions/checkout@v3
- name: lint
run: |
npm ci
npm run lint
build:
runs-on: ubuntu-latest
concurrency:
Expand Down Expand Up @@ -68,4 +68,4 @@ jobs:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: Check TSDoc Links
run: npx tsdoc-link-check --patterns packages/**
run: npx tsdoc-link-check --patterns packages/**
6 changes: 3 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
npm ci
npm run bootstrap:all
npm run build:all
#- name: lint
# run: |
# npm run lint
- name: lint
run: |
npm run lint
- name: test
run: |
npm run test:all:coverage
Expand Down
5 changes: 0 additions & 5 deletions documentation/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ Examples:
- `fix: array parsing issue when multiple spaces were contained in string`
- `docs: correct spelling of CHANGELOG`

## Git branches

- `next` – contains next version (1.x.0), most likely you would want to create a PR to this branch
- `master` – current stable version

## Changeset

[Changesets](https://github.com/changesets/changesets) are designed to make your workflows easier, by allowing the person making contributions to make key decisions when they are making their contribution. Changesets hold two key bits of information: a version type (following semver), and change information to be added to a changelog.
Expand Down
16 changes: 0 additions & 16 deletions examples/blog-material-ui-datagrid/.eslintrc.cjs

This file was deleted.

16 changes: 0 additions & 16 deletions examples/blog-refine-digital-ocean/.eslintrc.cjs

This file was deleted.

16 changes: 0 additions & 16 deletions examples/blog-refine-filtering/.eslintrc.cjs

This file was deleted.

16 changes: 0 additions & 16 deletions examples/blog-refine-mantine-strapi/.eslintrc.cjs

This file was deleted.

16 changes: 0 additions & 16 deletions examples/blog-refine-nextui/.eslintrc.cjs

This file was deleted.

16 changes: 0 additions & 16 deletions examples/blog-refine-primereact/.eslintrc.cjs

This file was deleted.

16 changes: 0 additions & 16 deletions examples/blog-win95/.eslintrc.cjs

This file was deleted.

76 changes: 6 additions & 70 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"cypress": "^12.11.0",
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.8",
"husky": "^8.0.1",
"jest": "^29.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ exports[`MuiInferencer should match the snapshot 1`] = `
aria-colcount="14"
aria-multiselectable="false"
aria-rowcount="3"
class="MuiDataGrid-root MuiDataGrid-autoHeight MuiDataGrid-root--densityStandard MuiDataGrid-withBorderColor css-145nbgs-MuiDataGrid-root"
class="MuiDataGrid-root MuiDataGrid-autoHeight MuiDataGrid-root--densityStandard MuiDataGrid-withBorderColor css-psf4ok-MuiDataGrid-root"
role="grid"
>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ exports[`MuiListInferencer should match the snapshot 1`] = `
aria-colcount="14"
aria-multiselectable="false"
aria-rowcount="3"
class="MuiDataGrid-root MuiDataGrid-autoHeight MuiDataGrid-root--densityStandard MuiDataGrid-withBorderColor css-145nbgs-MuiDataGrid-root"
class="MuiDataGrid-root MuiDataGrid-autoHeight MuiDataGrid-root--densityStandard MuiDataGrid-withBorderColor css-psf4ok-MuiDataGrid-root"
role="grid"
>
<div
Expand Down

0 comments on commit f0563cf

Please sign in to comment.