Skip to content

Commit

Permalink
Merge pull request #26 from lumirlumir/next
Browse files Browse the repository at this point in the history
feat: next.js
  • Loading branch information
lumirlumir authored Aug 24, 2024
2 parents d40205d + 240c276 commit 3af10ff
Show file tree
Hide file tree
Showing 92 changed files with 9,406 additions and 870 deletions.
9 changes: 9 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# dependencies
node_modules

# production
build
.next

# package
package-lock.json
15 changes: 15 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
root: true,
extends: [
// extends has priority. Last index has the highest priority.
'eslint:recommended',
'next/core-web-vitals',
'prettier',
],
env: {
es2024: true,
},
parserOptions: {
ecmaVersion: 15,
},
};
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [lumirlumir]
15 changes: 15 additions & 0 deletions .github/sync-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,35 @@ lumirlumir/lumirlumir-configs:
- source: ./.github/sync-client.yml
dest: ./clients/web-blog.yml
# ./.github/workflows
- source: ./.github/workflows/lint.yml
dest: ./configs/.github/workflows/lint.yml
- source: ./.github/workflows/sync-client.yml
dest: ./configs/.github/workflows/sync-client.yml
# ./.github
- source: ./.github/dependabot.yml
dest: ./configs/.github/dependabot.yml
- source: ./.github/FUNDING.yml
dest: ./configs/.github/FUNDING.yml
# ./.husky
- source: ./.husky/pre-commit
dest: ./configs/.husky/pre-commit
# ./.vscode
- source: ./.vscode/settings.json
dest: ./configs/.vscode/settings.json
# ./
- source: ./.editorconfig
dest: ./configs/.editorconfig
- source: ./.eslintignore
dest: ./configs/.eslintignore
- source: ./.gitignore
dest: ./configs/.gitignore
- source: ./.markdownlint.json
dest: ./configs/.markdownlint.json
- source: ./.nvmrc
dest: ./configs/.nvmrc
- source: ./.prettierignore
dest: ./configs/.prettierignore
- source: ./.prettierrc.js
dest: ./configs/.prettierrc.js
- source: ./VScode.code-workspace
dest: ./configs/VScode.code-workspace
16 changes: 12 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ on:

jobs:
lint:
# strategy:
# matrix:
# type:
# - eslint
# - prettier
# - editorconfig
# - markdownlint

runs-on: ubuntu-latest

steps:
Expand All @@ -30,8 +38,8 @@ jobs:
- name: Set up node_modules
run: npm ci

- name: Lint editorconfig
run: npm run lint-editorconfig
- name: Lint
run: npm run lint

- name: Lint markdownlint
run: npm run lint-markdownlint
# - name: Lint ${{ matrix.type }}
# run: npm run lint-${{ matrix.type }} --if-present
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
# dependencies
/node_modules
node_modules

# production
build
.next

# env
.env
.env.development
.env.production

# tests
.nyc_output
coverage
21 changes: 21 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# dependencies
node_modules

# production
build
.next

# env
.env
.env.development
.env.production

# test
.nyc_output
coverage

# package
package-lock.json

# markdown
*.md
11 changes: 11 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
printWidth: 90,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true,
trailingComma: 'all',
bracketSpacing: true,
arrowParens: 'avoid',
proseWrap: 'never',
};
3 changes: 3 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['stylelint-config-standard-scss', 'stylelint-config-recess-order'],
};
9 changes: 9 additions & 0 deletions .textlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
rules: {
'allowed-uris': {
allowed: {
images: [/^\/public\/images\//],
},
},
},
};
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always",
"source.fixAll.stylelint": "always",
"source.fixAll.markdownlint": "always"
}
},
"stylelint.validate": ["css", "scss"]
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# web-blog

## v?.?.? (2024-??-??)

First Release.🔥
15 changes: 15 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Integrate with VScode so that related information can be displayed when hovering the mouse.
{
"compilerOptions": {
"baseUrl": ".", // Set the base path to the current root directory.
"paths": {
"@/*": ["src/*"] // Map the '@' alias to the 'src' directory.
}
},
"include": [
"src/**/*" // Ensure that the jsconfig recognizes the project's src files.
],
"exclude": [
"node_modules" // Exclude the node_modules directory.
]
}
10 changes: 10 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const path = require('path');

module.exports = {
sassOptions: {
includePaths: [path.resolve(__dirname, 'src', 'styles')],
additionalData: `
@import 'mixins';
`,
},
};
Loading

0 comments on commit 3af10ff

Please sign in to comment.