Skip to content

Commit

Permalink
Merge pull request #9 from alchemisten/hotfix/update-dependencies
Browse files Browse the repository at this point in the history
Merge branch 'hotfix/update dependencies' into main
  • Loading branch information
vspdi authored Nov 1, 2023
2 parents 30c9c5b + 373c68f commit 19f9356
Show file tree
Hide file tree
Showing 7 changed files with 14,754 additions and 5,138 deletions.
34 changes: 32 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
module.exports = {
plugins: ["import"],
extends: "airbnb-typescript-prettier",
plugins: [
"react",
"jsx-a11y",
"import",
"prettier",
"@typescript-eslint"
],
extends: [
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
"plugin:@typescript-eslint/recommended",
"prettier"
],
ignorePatterns: ["**/*.d.ts", "**/*.js"],
rules: {
"arrow-body-style": "off",
"import/extensions": [
"error",
"ignorePackages",
{
js: "never",
mjs: "never",
jsx: "never",
ts: "never",
tsx: "never",
},
],
"import/prefer-default-export": "off",
"no-await-in-loop": "off",
"no-cond-assign": "off",
Expand Down Expand Up @@ -55,9 +79,15 @@ module.exports = {
},
settings: {
"import/resolver": {
node: {
extensions: [".js", ".ts", ".jsx", ".tsx", ".json"],
},
typescript: {
alwaysTryTypes: true
}
}
},
parserOptions: {
project: "./tsconfig.json",
}
};
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
node-version: 18
always-auth: true
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- run: yarn install --frozen-lockfile
- run: npm ci
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Preconfigured ESLint rules and Prettier formatting for plug and play usage in pr
For NX projects simply copy over the rules for now.

## How to use
* Install @schablone/eslint-config with: `yarn add @schablone/eslint-config`
* Install the required peer dependencies if not present: `yarn add eslint prettier -D`
* Install @schablone/eslint-config with: `yarn add @schablone/eslint-config -D` or `npm install @schablone/eslint-config --save-dev`
* Install the required peer dependencies if not present: `yarn add eslint prettier -D` or `npm install eslint prettier --save-dev`
* Use it within your .eslintrc:
```json
{
Expand All @@ -21,7 +21,9 @@ needs to be major release, because it will break dependent code.
These are all the rules which differ from the AirBnB config or the default Prettier settings:

### ES Lint
* `arrow-body-style`: Turned off, because we want to keep the option to be explicit
* `import/prefer-default-export`: Default imports are not preferred
* `import/extensions`: Turned off, because it is not necessary with Typescript
* `no-await-in-loop`: It is more common to have dependent calls in a loop than parallelizable calls
* `no-cond-assign`: Turned off to allow assigning in while loops
* `no-restricted-imports`: Make sure all Material UI components are imported directly from core
Expand Down
2 changes: 1 addition & 1 deletion example/react-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface SampleComponentProps {
export const SampleComponent: FC<SampleComponentProps> = ({ one, two = '' }) => {
const [state, setState] = useState(false);
const text =
'I am a long text, tha goes well beyond the normal 80 characters allowed in prettier and also way over the new 120 and then some';
'I am a long text, that goes well beyond the normal 80 characters allowed in prettier and also way over the new 120 and then some';
const { spacing } = useTheme();
const style = {
button: {
Expand Down
Loading

0 comments on commit 19f9356

Please sign in to comment.