Skip to content

Commit

Permalink
feat(js-version): add javascript version
Browse files Browse the repository at this point in the history
  • Loading branch information
neelbrahmakshatriya committed Jun 18, 2024
1 parent ee56a6f commit 78f85f6
Show file tree
Hide file tree
Showing 249 changed files with 17,388 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/*.zip
/package
/javascript-version
15 changes: 15 additions & 0 deletions javascript-version/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false
[*.yml]
[*.{yml,yaml}]
indent_size = 2
8 changes: 8 additions & 0 deletions javascript-version/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -----------------------------------------------------------------------------
# App
# -----------------------------------------------------------------------------
BASEPATH=
NEXT_PUBLIC_APP_URL=http://localhost:3000${BASEPATH}
NEXT_PUBLIC_DOCS_URL=https://demos.themeselection.com/materio-mui-nextjs-admin-template/documentation
NEXT_PUBLIC_PRO_URL=https://demos.themeselection.com/materio-mui-nextjs-admin-template/demo-1
NEXT_PUBLIC_REPO_NAME=materio-mui-nextjs-admin-template-free
137 changes: 137 additions & 0 deletions javascript-version/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
module.exports = {
"extends": [
"next/core-web-vitals",
"plugin:import/recommended",
"prettier"
],
"rules": {
"jsx-a11y/alt-text": "off",
"react/display-name": "off",
"react/no-children-prop": "off",
"@next/next/no-img-element": "off",
"@next/next/no-page-custom-font": "off",
"lines-around-comment": [
"error",
{
"beforeBlockComment": true,
"beforeLineComment": true,
"allowBlockStart": true,
"allowObjectStart": true,
"allowArrayStart": true
}
],
"padding-line-between-statements": [
"error",
{
"blankLine": "any",
"prev": "export",
"next": "export"
},
{
"blankLine": "always",
"prev": [
"const",
"let",
"var"
],
"next": "*"
},
{
"blankLine": "any",
"prev": [
"const",
"let",
"var"
],
"next": [
"const",
"let",
"var"
]
},
{
"blankLine": "always",
"prev": "*",
"next": [
"function",
"multiline-const",
"multiline-block-like"
]
},
{
"blankLine": "always",
"prev": [
"function",
"multiline-const",
"multiline-block-like"
],
"next": "*"
}
],
"newline-before-return": "error",
"import/newline-after-import": [
"error",
{
"count": 1
}
],
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
[
"internal",
"parent",
"sibling",
"index"
],
[
"object",
"unknown"
]
],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
},
{
"pattern": "next/**",
"group": "external",
"position": "before"
},
{
"pattern": "~/**",
"group": "external",
"position": "before"
},
{
"pattern": "@/**",
"group": "internal"
}
],
"pathGroupsExcludedImportTypes": [
"react",
"type"
],
"newlines-between": "always-and-inside-groups"
}
]
},
"settings": {
"react": {
"version": "detect"
},
"import/parsers": {},
"import/resolver": {
"node": {},
"typescript": {
"project": "./jsconfig.json"
}
}
},
"overrides": []
};
41 changes: 41 additions & 0 deletions javascript-version/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local
.env

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

# icon generated file
src/assets/iconify-icons/generated-icons.js
src/assets/iconify-icons/generated-icons.css
2 changes: 2 additions & 0 deletions javascript-version/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
auto-install-peers=true
shamefully-hoist=true
17 changes: 17 additions & 0 deletions javascript-version/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"arrowParens": "avoid",
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"bracketSameLine": false,
"jsxSingleQuote": true,
"printWidth": 120,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false
}
16 changes: 16 additions & 0 deletions javascript-version/.stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"plugins": [
"stylelint-use-logical-spec"
],
"overrides": [
{
"customSyntax": "postcss-styled-syntax",
"files": [
"**/*.{js,ts,jsx,tsx}"
]
}
],
"rules": {
"liberty/use-logical-spec": "always"
}
}
109 changes: 109 additions & 0 deletions javascript-version/.vscode/custom.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
// JavaScript Snippets
"exportDefault": {
"prefix": "exp",
"body": [
"export default ${1:moduleName}",
""
]
},
"exportDestructing": {
"prefix": "exd",
"body": [
"export { ${2:destructuredModule} } from '${1:module}'",
""
]
},
"exportAs": {
"prefix": "exa",
"body": [
"export { ${2:originalName} as ${3:aliasName}} from '${1:module}'",
""
]
},
"exportDefaultFunction": {
"prefix": "edf",
"body": [
"export default (${1:params}) => {",
" $0",
"}",
""
]
},
"exportDefaultNamedFunction": {
"prefix": "ednf",
"body": [
"export default function ${1:functionName}(${2:params}) {",
" $0",
"}",
""
]
},
// React Snippets
"reactArrowFunctionExportComponent": {
"prefix": "rafce",
"body": [
"const ${1:ComponentName} = () => {",
" return (",
" $0",
" )",
"}",
"",
"export default ${1:ComponentName}",
""
]
},
"reactArrowFunctionComponent": {
"prefix": "rafc",
"body": [
"const ${1:ComponentName} = () => {",
" return (",
" $0",
" )",
"}",
""
]
},
"reactUseState": {
"prefix": "useState",
"body": [
"const [${1:state}, set${1/(.*)/${1:/capitalize}/}] = useState(${2:initialState})"
]
},
"reactUseEffect": {
"prefix": "useEffect",
"body": [
"useEffect(() => {",
" $0",
"}, [])"
]
},
// Type Snippets
"exportType": {
"prefix": "exptp",
"body": [
"export type ${1:Props} = {",
" ${2:name}: ${3:string}",
"}",
""
]
},
"type": {
"prefix": "tp",
"body": [
"type ${1:Props} = {",
" ${2:name}: ${3:string}",
"}",
""
]
},
// Next Snippets
"nextImport": {
"prefix": "impn",
"body": [
"// Next Import",
"import ${2:second} from '${1:first}'",
""
]
}
}
26 changes: 26 additions & 0 deletions javascript-version/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"recommendations": [
"formulahendry.auto-close-tag",
"steoates.autoimport",
"mgmcdermott.vscode-language-babel",
"aaron-bond.better-comments",
"MohammadBaqer.better-folding",
"pustelto.bracketeer",
"streetsidesoftware.code-spell-checker",
"naumovs.color-highlight",
"mikestead.dotenv",
"EditorConfig.EditorConfig",
"usernamehw.errorlens",
"dbaeumer.vscode-eslint",
"eamodio.gitlens",
"antfu.iconify",
"xabikos.JavaScriptSnippets",
"christian-kohler.npm-intellisense",
"christian-kohler.path-intellisense",
"esbenp.prettier-vscode",
"yoavbls.pretty-ts-errors",
"jasonnutter.search-node-modules",
"stylelint.vscode-stylelint",
"styled-components.vscode-styled-components"
]
}
Loading

0 comments on commit 78f85f6

Please sign in to comment.