Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: migrate build script to typescript #3423

Draft
wants to merge 65 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
2935475
format scripts
JeelRajodiya Nov 16, 2024
2badba7
format using prettier
JeelRajodiya Nov 16, 2024
ad8c426
migrate build-pages
JeelRajodiya Nov 18, 2024
eedff42
add ts-node configuration
JeelRajodiya Nov 18, 2024
df75c79
setup eslint rule to ignore js-doc in script files
JeelRajodiya Nov 18, 2024
7bf568a
Revert "setup eslint rule to ignore js-doc in script files"
JeelRajodiya Nov 18, 2024
4c51a80
move to imports
JeelRajodiya Nov 20, 2024
fbb0e61
rename next config file
JeelRajodiya Nov 20, 2024
fd80ef2
add new path config
JeelRajodiya Nov 20, 2024
f5b38a7
update import names
JeelRajodiya Nov 20, 2024
7b6c3b9
rename utils file to ts
JeelRajodiya Nov 20, 2024
a8c12ea
add types
JeelRajodiya Nov 21, 2024
e2097cc
update import
JeelRajodiya Nov 21, 2024
c01fb85
rename
JeelRajodiya Nov 21, 2024
c7a7247
rename to ts
JeelRajodiya Nov 21, 2024
a49c8a2
rename compose to ts
JeelRajodiya Nov 21, 2024
342432a
rename build docs to ts
JeelRajodiya Nov 21, 2024
9e8efd8
rename build meeting to ts
JeelRajodiya Nov 21, 2024
2e94f4c
rename build newsroom
JeelRajodiya Nov 21, 2024
6b6c4ea
rename build postlist to ts
JeelRajodiya Nov 21, 2024
136bd49
rename build rss
JeelRajodiya Nov 21, 2024
3e1536a
rename build tools to ts
JeelRajodiya Nov 21, 2024
2528190
rename readWriteJSON to ts
JeelRajodiya Nov 21, 2024
34b1cef
add type assertion of json
JeelRajodiya Nov 21, 2024
cecc10e
rename all files to ts
JeelRajodiya Nov 21, 2024
adb15fe
update imports
JeelRajodiya Nov 21, 2024
a05df3f
update file extentions
JeelRajodiya Nov 21, 2024
8cb082b
add ts-node config
JeelRajodiya Nov 21, 2024
b656d31
fix eslint issues. use promise.all instead of await in a loop
JeelRajodiya Nov 22, 2024
40daa1c
Merge branch 'master' into script-migration-2
asyncapi-bot Nov 22, 2024
717135f
fix eslint error
JeelRajodiya Nov 22, 2024
e8e30eb
rename
JeelRajodiya Nov 22, 2024
212e548
rename
JeelRajodiya Nov 22, 2024
652dfc8
Merge branch 'master' into script-migration-2
JeelRajodiya Nov 23, 2024
d3acd81
fix eslint error
JeelRajodiya Nov 23, 2024
09a2fcc
add error type
JeelRajodiya Nov 23, 2024
f5fac70
add new types
JeelRajodiya Nov 23, 2024
2f782e7
add types
JeelRajodiya Nov 23, 2024
1a1f47d
refactor and fix eslint errors
JeelRajodiya Nov 23, 2024
75a53d4
use google apis and add types
JeelRajodiya Nov 23, 2024
74d199f
remove console log
JeelRajodiya Nov 23, 2024
0459723
add specific rules for the script folder
JeelRajodiya Nov 23, 2024
3df75cf
Merge branch 'script-migration-2' of https://github.com/JeelRajodiya/…
JeelRajodiya Nov 23, 2024
24ff781
refactor dir variables
JeelRajodiya Nov 23, 2024
39821b7
add types and refactor it
JeelRajodiya Nov 23, 2024
00ed279
refactor: update eslint rules
JeelRajodiya Nov 24, 2024
8bf03da
reformat document
JeelRajodiya Nov 24, 2024
15ffa2b
update include paths
JeelRajodiya Nov 24, 2024
02e679a
use dynamic import
JeelRajodiya Nov 24, 2024
227995d
reformat eslintrc
JeelRajodiya Nov 26, 2024
be73210
Merge branch 'master' into script-migration-2
JeelRajodiya Nov 27, 2024
599ab9e
update rules
JeelRajodiya Nov 27, 2024
e71fcba
change tabs to spaces
JeelRajodiya Nov 27, 2024
851d1af
update ts node config
JeelRajodiya Nov 27, 2024
81d6cfc
migrate tools scripts
JeelRajodiya Nov 27, 2024
c5b5c9f
refactor __dirname variable
JeelRajodiya Nov 27, 2024
a42104e
refactor function in build-rss
JeelRajodiya Nov 27, 2024
add1c28
add new package type
JeelRajodiya Nov 27, 2024
b776dc7
Added error handling for undefined types
JeelRajodiya Nov 27, 2024
5b82b5d
add types
JeelRajodiya Nov 27, 2024
0916549
refactor adopter/index.ts
JeelRajodiya Nov 27, 2024
b294a6a
Merge branch 'master' into script-migration-2
JeelRajodiya Nov 29, 2024
93ff413
Merge branch 'master' into script-migration-2
JeelRajodiya Dec 12, 2024
ba0a99a
use tsx instead of ts-node
JeelRajodiya Dec 12, 2024
c76a556
add types for build RSS
JeelRajodiya Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
173 changes: 65 additions & 108 deletions .eslintrc
JeelRajodiya marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,15 @@
"next/core-web-vitals",
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:storybook/recommended"
"plugin:storybook/recommended",
],
"env": {
"browser": true,
"es2021": true,
"node": true,
"jest": true
"jest": true,
},
"plugins": [
"react",
"jsx-a11y"
],
"plugins": ["react", "jsx-a11y"],
"rules": {
"prettier/prettier": [
"error",
Expand All @@ -33,47 +30,43 @@
"insertPragma": false,
"requirePragma": false,
"jsxSingleQuote": true,
"printWidth": 120
}
"printWidth": 120,
},
],
"max-len": [
"error",
{
"code": 120,
"ignoreUrls": true,
"ignorePattern": "(className=\\{[\\s\\S]*\\}|.*\\}|'.*'|className='.*')" // Ignore classnames
}
]
"ignorePattern": "(className=\\{[\\s\\S]*\\}|.*\\}|'.*'|className='.*')", // Ignore classnames
},
],
},
"globals": {
"React": true,
"expect": true,
"jsdom": true,
"JSX": true
"JSX": true,
},
"overrides": [
// Configuration for TypeScript files
{
"files": [
"**/*.ts",
"**/*.tsx",
"netlify/*.ts"
],
"files": ["**/*.ts", "**/*.tsx", "netlify/*.ts"],
"plugins": [
"@typescript-eslint",
"tailwindcss",
"unused-imports",
"simple-import-sort"
"simple-import-sort",
],
"extends": [
"plugin:tailwindcss/recommended",
"airbnb-typescript",
"next/core-web-vitals",
"plugin:prettier/recommended",
"plugin:storybook/recommended"
"plugin:storybook/recommended",
],
"parserOptions": {
"project": "./tsconfig.json"
"project": "./tsconfig.json",
},
"rules": {
"react/destructuring-assignment": "off", // Vscode doesn't support automatically destructuring, it's a pain to add a new variable
Expand All @@ -89,7 +82,7 @@
"error",
"ForInStatement",
"LabeledStatement",
"WithStatement"
"WithStatement",
], // Overrides Airbnb configuration and enable no-restricted-syntax
"import/prefer-default-export": "off", // Named export is easier to refactor automatically
"tailwindcss/no-custom-classname": "off", // Disabled otherwise nightmare to allow each custom tailwind classes
Expand All @@ -101,8 +94,8 @@
"unused-imports/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_"
}
"argsIgnorePattern": "^_",
},
],
// Variables
"init-declarations": "off",
Expand All @@ -126,42 +119,30 @@
"off",
"stroustrup",
{
"allowSingleLine": true
}
"allowSingleLine": true,
},
],
"camelcase": "off",
"capitalized-comments": "off",
"comma-dangle": [
"error",
"never"
],
"comma-dangle": ["error", "never"],
"comma-spacing": [
2,
{
"before": false,
"after": true
}
],
"comma-style": [
"error",
"last"
"after": true,
},
],
"comma-style": ["error", "last"],
"eol-last": "error",
"func-call-spacing": "error",
"func-name-matching": "error",
"func-names": "off",
"func-style": "off",
"jsx-quotes": [
"error",
"prefer-single"
],
"jsx-quotes": ["error", "prefer-single"],
"key-spacing": "error",
"keyword-spacing": "error",
"line-comment-position": "off",
"linebreak-style": [
"error",
"unix"
],
"linebreak-style": ["error", "unix"],
"lines-around-comment": [
"error",
{
Expand All @@ -174,22 +155,22 @@
"allowObjectStart": true,
"allowObjectEnd": false,
"allowArrayStart": true,
"allowArrayEnd": false
}
"allowArrayEnd": false,
},
],
"max-depth": "error",
"max-lines": [
"error",
{
"max": 2000
}
"max": 2000,
},
],
"max-nested-callbacks": "error",
"max-statements-per-line": [
"error",
{
"max": 2
}
"max": 2,
},
],
"multiline-comment-style": "off",
"multiline-ternary": "off",
Expand All @@ -198,13 +179,10 @@
"newline-per-chained-call": [
"error",
{
"ignoreChainWithDepth": 4
}
],
"newline-after-var": [
"error",
"always"
"ignoreChainWithDepth": 4,
},
],
"newline-after-var": ["error", "always"],
"no-array-constructor": "error",
"no-lonely-if": "error",
"no-mixed-operators": "off",
Expand All @@ -213,8 +191,8 @@
"no-multiple-empty-lines": [
"error",
{
"max": 1
}
"max": 1,
},
],
"no-negated-condition": "error",
"no-nested-ternary": "error",
Expand All @@ -227,63 +205,39 @@
"no-whitespace-before-property": "error",
"nonblock-statement-body-position": "error",
"object-curly-newline": "off",
"object-curly-spacing": [
"error",
"always"
],
"object-curly-spacing": ["error", "always"],
"object-property-newline": "off",
"padded-blocks": [
"error",
"never"
],
"padded-blocks": ["error", "never"],
"padding-line-between-statements": [
"error",
{
"blankLine": "always",
"prev": "*",
"next": "return"
"next": "return",
},
{
"blankLine": "always",
"prev": [
"const",
"let",
"var"
],
"next": "*"
"prev": ["const", "let", "var"],
"next": "*",
},
{
"blankLine": "any",
"prev": [
"const",
"let",
"var"
],
"next": [
"const",
"let",
"var"
]
}
],
"quote-props": [
"error",
"as-needed"
"prev": ["const", "let", "var"],
"next": ["const", "let", "var"],
},
],
"quote-props": ["error", "as-needed"],
"quotes": [
"error",
"single",
{
"avoidEscape": true
}
"avoidEscape": true,
},
],
"require-jsdoc": "warn",
"require-jsdoc": "off",
"semi": "error",
"semi-spacing": "error",
"semi-style": [
"error",
"last"
],
"semi-style": ["error", "last"],
"sort-keys": "off",
"sort-vars": "off",
"space-before-blocks": "error",
Expand All @@ -296,22 +250,25 @@
"always",
{
"block": {
"exceptions": [
"!"
]
}
}
"exceptions": ["!"],
},
},
],
"switch-colon-spacing": "error"
}
"switch-colon-spacing": "error",
},
},
{
"files": [
"components/logos/*"
],
"files": ["components/logos/*"],
"rules": {
"max-len": "off",
},
},
{
"files": ["scripts/**/*"],
"rules": {
"max-len": "off"
}
}
]
"import/no-extraneous-dependencies": "off",
"no-console": "off",
},
},
],
}
File renamed without changes.
13 changes: 13 additions & 0 deletions next-i18next.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// The file is required to be named next-i18next.config.cjs so we can use it in next.config.js.
// https://github.com/i18next/next-i18next/issues/2185#issuecomment-1618307556
process.env.I18NEXT_DEFAULT_CONFIG_PATH = './next-i18next.config.cjs';

module.exports = {
i18n: {
locales: ['en', 'de'],
defaultLocale: 'en',
namespaces: ['landing-page', 'common', 'tools'],
defaultNamespace: 'landing-page',
react: { useSuspense: false } // this line
}
};
10 changes: 0 additions & 10 deletions next-i18next.config.js

This file was deleted.

Loading
Loading