Skip to content

Commit

Permalink
Merge pull request #35 from twentyideas/dependabot/npm_and_yarn/prett…
Browse files Browse the repository at this point in the history
…ier-plugin-organize-imports-4.1.0

Bump prettier-plugin-organize-imports from 4.0.0 to 4.1.0
  • Loading branch information
mckelveygreg authored Sep 30, 2024
2 parents b1bf847 + 308ef78 commit 0358a11
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 23 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
!/.yarn/plugins
!/.yarn/releases
!/.yarn/sdks
!/.yarn/versions

# Swap the comments on the following lines if you don't wish to use zero-installs
# Documentation here: https://yarnpkg.com/features/zero-installs
Expand All @@ -11,4 +12,4 @@

/node_modules
.eslintcache
/.vscode
/.vscode
5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

## Usage

### eslint.config.js

```js
import baseConfig from "@20i/eslint-config"
import reactConfig from "@20i/eslint-config/react"
Expand Down Expand Up @@ -47,6 +49,25 @@ export default tsEslint.config(
)
```

### prettier.config.js

We can share prettier configs now! 🎉

```js
import sharedConfig from "@20i/eslint-config/prettier.config"
/**
* @see https://prettier.io/docs/en/configuration.html
* @type {import("prettier").Config}
*/
const config = {
...sharedConfig,
// override any shared config here
arrowParens: "avoid",
}

export default config
```

## Configure VS Code

[1]: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
Expand Down Expand Up @@ -150,6 +171,7 @@ npx mrm eslint --preset @20i/mrm-preset
{
"endOfLine": "auto",
"semi": false,
"trailingComma": "es5"
"trailingComma": "es5",
"plugins": ["prettier-plugin-organize-imports"]
}
```
4 changes: 2 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// @ts-check

import globals from "globals"
import eslint from "@eslint/js"
import tsEslint from "typescript-eslint"
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended"
import globals from "globals"
import tsEslint from "typescript-eslint"

export default tsEslint.config(
eslint.configs.recommended,
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "@20i/eslint-config",
"version": "4.0.0-rc.1",
"version": "4.0.0",
"description": "ESLint and Prettier Config for Twenty Ideas",
"main": "index.js",
"exports": {
"./react": "./react.js",
"./react-native": "./react-native.js",
".": "./index.js"
".": "./index.js",
"./prettier.config": "./prettier.config.js"
},
"type": "module",
"author": "Greg McKelvey <[email protected]>",
Expand Down Expand Up @@ -35,7 +36,7 @@
"react.js",
"react-native.js",
"tsconfig.json",
".prettierrc",
"prettier.config.js",
"*.d.ts"
],
"packageManager": "[email protected]",
Expand Down
5 changes: 5 additions & 0 deletions prettier.config.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { Config } from "prettier"

declare const config: Config

export default config
12 changes: 12 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* @see https://prettier.io/docs/en/configuration.html
* @type {import("prettier").Config}
*/
const config = {
endOfLine: "auto",
semi: false,
trailingComma: "es5",
plugins: ["prettier-plugin-organize-imports"],
}

export default config
4 changes: 2 additions & 2 deletions react-native.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { FlatCompat } from "@eslint/eslintrc"
import reactConfig from "eslint-plugin-react"
import reactNative from "eslint-plugin-react-native"
import globals from "globals"
import { FlatCompat } from "@eslint/eslintrc"
import tsEslint from "typescript-eslint"
import reactNative from "eslint-plugin-react-native"

const compat = new FlatCompat()

Expand Down
4 changes: 2 additions & 2 deletions react.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import reactConfig from "eslint-plugin-react"
import { FlatCompat } from "@eslint/eslintrc"
import jsxA11y from "eslint-plugin-jsx-a11y"
import reactConfig from "eslint-plugin-react"
import globals from "globals"
import { FlatCompat } from "@eslint/eslintrc"
import tsEslint from "typescript-eslint"

const compat = new FlatCompat()
Expand Down
11 changes: 4 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2584,19 +2584,16 @@ __metadata:
linkType: hard

"prettier-plugin-organize-imports@npm:^4.0.0":
version: 4.0.0
resolution: "prettier-plugin-organize-imports@npm:4.0.0"
version: 4.1.0
resolution: "prettier-plugin-organize-imports@npm:4.1.0"
peerDependencies:
"@vue/language-plugin-pug": ^2.0.24
prettier: ">=2.0"
typescript: ">=2.9"
vue-tsc: ^2.0.24
vue-tsc: ^2.1.0
peerDependenciesMeta:
"@vue/language-plugin-pug":
optional: true
vue-tsc:
optional: true
checksum: 10/444bc34858ddadd9e4c9afa5f45ee80786d539a28f3535af7e341e885eb569b465fc7b27b2738a69cb99cc530c6e15367514a7b97ed52dea8161307d7d55b3ac
checksum: 10/8223af6d42d06f6a5140a2724a6c6c2cef4a2e149721ceb25b945af71f4de7499bc63e47ea003b9eee84e6b94728b59d91b4275d3c53b718a747e273fb30cee2
languageName: node
linkType: hard

Expand Down

0 comments on commit 0358a11

Please sign in to comment.