Skip to content

Commit

Permalink
v2.1.0-analytics - Add Vercel Analytics (#16)
Browse files Browse the repository at this point in the history
* add analytics

* rm publishing scripts
  • Loading branch information
nishkohli96 authored Oct 20, 2024
1 parent a8d1764 commit eec1e14
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 41 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/release.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
node_modules
.DS_Store

publish.sh
16 changes: 16 additions & 0 deletions apps/eslint-config-docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,26 @@ const config: Config = {
defaultLocale: 'en',
locales: ['en'],
},
plugins: [
[
'vercel-analytics',
{
debug: true,
mode: 'auto',
},
],
],
presets: [
[
'@docusaurus/preset-classic',
{
sitemap: {
lastmod: 'date',
changefreq: 'monthly',
priority: 0.5,
ignorePatterns: ['/tags/**'],
filename: 'sitemap.xml'
},
docs: {
routeBasePath: '/',
lastVersion: '2.1',
Expand Down
1 change: 1 addition & 0 deletions apps/eslint-config-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"dependencies": {
"@docusaurus/core": "3.5.2",
"@docusaurus/plugin-vercel-analytics": "^3.5.2",
"@docusaurus/preset-classic": "3.5.2",
"@mdx-js/react": "^3.1.0",
"clsx": "^2.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,20 @@ module.exports = {
}
```

React applications would need both the `js` and `react` config import of this package.
React or Vite applications would need both the `js` and `react` config import of this package.

```diff
module.exports = {
- extends: ['@nish1896']
+ extends: ['@nish1896/eslint-config/js', '@nish1896/eslint-config/react']
}
```

NextJS applications would need both the `js` and `next` config import of this package. The `next` import is available from **v2.1.0** and above.

```diff
module.exports = {
- extends: ['@nish1896']
+ extends: ['@nish1896/eslint-config/js', '@nish1896/eslint-config/next']
}
```
5 changes: 1 addition & 4 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@
"./react": "./lib/react/index.js"
},
"scripts": {
"test": "eslint __tests__",
"fix": "eslint --fix __tests__",
"link:local": "npm link",
"unlink:local": "npm unlink @nish1896/eslint-config",
"publish:ci": "npm publish --provenance --access public",
"publish:manual": "npm publish --access public"
},
"keywords": [
Expand Down Expand Up @@ -49,5 +46,5 @@
"eslint": ">=7 <9",
"typescript": ">=4"
},
"license": "ISC"
"license": "MIT"
}
5 changes: 1 addition & 4 deletions packages/eslint-flat-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@
"./jsx": "./lib/jsx/index.mjs"
},
"scripts": {
"test": "eslint __tests__",
"fix": "eslint --fix __tests__",
"link:local": "npm link",
"unlink:local": "npm unlink @nish1896/eslint-flat-config",
"publish:ci": "npm publish --provenance --access public",
"publish:manual": "npm publish --access public"
},
"keywords": [
Expand Down Expand Up @@ -56,5 +53,5 @@
"@eslint/js": ">=9",
"eslint": ">=9"
},
"license": "ISC"
"license": "MIT"
}
25 changes: 25 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1677,6 +1677,19 @@
sitemap "^7.1.1"
tslib "^2.6.0"

"@docusaurus/plugin-vercel-analytics@^3.5.2":
version "3.5.2"
resolved "https://registry.yarnpkg.com/@docusaurus/plugin-vercel-analytics/-/plugin-vercel-analytics-3.5.2.tgz#3e81a11b2e9091d337a6dcb31dfefbae50c0ee52"
integrity sha512-8PyH3nWgV011cxeMJmm3NMYvjume1c7JAMhGqYGQbvBj1PxMFPw12ciIXtxFukgAH0qIIQigjvn9Gcv5Bq8KNQ==
dependencies:
"@docusaurus/core" "3.5.2"
"@docusaurus/logger" "3.5.2"
"@docusaurus/types" "3.5.2"
"@docusaurus/utils" "3.5.2"
"@docusaurus/utils-validation" "3.5.2"
"@vercel/analytics" "^1.1.1"
tslib "^2.6.0"

"@docusaurus/preset-classic@3.5.2":
version "3.5.2"
resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-3.5.2.tgz#977f78510bbc556aa0539149eef960bb7ab52bd9"
Expand Down Expand Up @@ -3708,6 +3721,13 @@
resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406"
integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==

"@vercel/analytics@^1.1.1":
version "1.3.1"
resolved "https://registry.yarnpkg.com/@vercel/analytics/-/analytics-1.3.1.tgz#e2b1deac1b5d14fa2e4fe36186ac5054c6385ae4"
integrity sha512-xhSlYgAuJ6Q4WQGkzYTLmXwhYl39sWjoMA3nHxfkvG+WdBT25c563a7QhwwKivEOZtPJXifYHR1m2ihoisbWyA==
dependencies:
server-only "^0.0.1"

"@vitejs/plugin-react@^4.3.2":
version "4.3.3"
resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-4.3.3.tgz#28301ac6d7aaf20b73a418ee5c65b05519b4836c"
Expand Down Expand Up @@ -12620,6 +12640,11 @@ serve-static@1.16.2:
parseurl "~1.3.3"
send "0.19.0"

server-only@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/server-only/-/server-only-0.0.1.tgz#0f366bb6afb618c37c9255a314535dc412cd1c9e"
integrity sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==

set-function-length@^1.2.1:
version "1.2.2"
resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449"
Expand Down

0 comments on commit eec1e14

Please sign in to comment.