mirror of
https://github.com/Aviortheking/next-template.git
synced 2025-04-22 18:52:09 +00:00
Updated files
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
f5c92b52c2
commit
21eba2d473
@ -5,4 +5,4 @@ indent_style = tab
|
|||||||
indent_size = 4
|
indent_size = 4
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
42
.eslintrc.js
42
.eslintrc.js
@ -40,14 +40,16 @@ module.exports = {
|
|||||||
"error",
|
"error",
|
||||||
"unix"
|
"unix"
|
||||||
],
|
],
|
||||||
quotes: [
|
|
||||||
"error",
|
quotes: "off",
|
||||||
"single"
|
"@typescript-eslint/quotes": ["error", "single", { avoidEscape: true }],
|
||||||
],
|
|
||||||
semi: [
|
semi: "off",
|
||||||
"error",
|
"@typescript-eslint/semi": "error",
|
||||||
"never"
|
|
||||||
],
|
"no-unused-expressions": "off",
|
||||||
|
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
|
||||||
|
|
||||||
"@typescript-eslint/adjacent-overload-signatures": "error",
|
"@typescript-eslint/adjacent-overload-signatures": "error",
|
||||||
"@typescript-eslint/array-type": [
|
"@typescript-eslint/array-type": [
|
||||||
"error",
|
"error",
|
||||||
@ -109,7 +111,13 @@ module.exports = {
|
|||||||
"error",
|
"error",
|
||||||
"as-needed"
|
"as-needed"
|
||||||
],
|
],
|
||||||
camelcase: "error",
|
|
||||||
|
camelcase: "off",
|
||||||
|
"@typescript-eslint/camelcase": ["error", {
|
||||||
|
properties: "never",
|
||||||
|
allow: ["^[A-Za-z][a-zA-Za-z]+_[A-Za-z]+$"]
|
||||||
|
}],
|
||||||
|
|
||||||
"comma-dangle": [
|
"comma-dangle": [
|
||||||
"error",
|
"error",
|
||||||
"always-multiline"
|
"always-multiline"
|
||||||
@ -168,7 +176,6 @@ module.exports = {
|
|||||||
"no-undef-init": "error",
|
"no-undef-init": "error",
|
||||||
"no-underscore-dangle": "error",
|
"no-underscore-dangle": "error",
|
||||||
"no-unsafe-finally": "error",
|
"no-unsafe-finally": "error",
|
||||||
"no-unused-expressions": "error",
|
|
||||||
"no-unused-labels": "error",
|
"no-unused-labels": "error",
|
||||||
"no-unused-vars": "off",
|
"no-unused-vars": "off",
|
||||||
"no-var": "error",
|
"no-var": "error",
|
||||||
@ -183,14 +190,13 @@ module.exports = {
|
|||||||
"consistent-as-needed"
|
"consistent-as-needed"
|
||||||
],
|
],
|
||||||
"radix": "error",
|
"radix": "error",
|
||||||
"space-before-function-paren": [
|
|
||||||
"error",
|
"space-before-function-paren": "off",
|
||||||
{
|
"@typescript-eslint/space-before-function-paren": ["error", {
|
||||||
anonymous: "never",
|
asyncArrow: "always",
|
||||||
asyncArrow: "always",
|
anonymous: "never",
|
||||||
named: "never"
|
named: "never"
|
||||||
}
|
}],
|
||||||
],
|
|
||||||
"spaced-comment": "error",
|
"spaced-comment": "error",
|
||||||
"use-isnan": "error",
|
"use-isnan": "error",
|
||||||
"valid-typeof": "off",
|
"valid-typeof": "off",
|
||||||
|
17
README.md
17
README.md
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
## Folders
|
## Folders
|
||||||
|
|
||||||
|
## __tests__
|
||||||
|
|
||||||
|
Test files to test webpage or single components
|
||||||
|
|
||||||
### Components
|
### Components
|
||||||
|
|
||||||
Folder where you put your React components
|
Folder where you put your React components
|
||||||
@ -33,11 +37,14 @@ Stylus files location
|
|||||||
- [x] Support Typescript
|
- [x] Support Typescript
|
||||||
- [x] Support Javascript
|
- [x] Support Javascript
|
||||||
- [ ] Support Javascript files Linting
|
- [ ] Support Javascript files Linting
|
||||||
|
- [x] Unit Testing
|
||||||
|
- [ ] Lint unit tests
|
||||||
|
|
||||||
### Stylus
|
### Stylus
|
||||||
|
|
||||||
- [x] Support Stylus files
|
- [x] Support Stylus files
|
||||||
- [x] Support Stylus Styled-jsx
|
- [x] Support Stylus Styled-jsx (mutually exclusive with purgeCSS)
|
||||||
|
- [x] Support PurgeCSS (mutually exclusive with styled-jsx)
|
||||||
- [ ] Support both Stylus CSS modules and purge CSS
|
- [ ] Support both Stylus CSS modules and purge CSS
|
||||||
- [ ] Support typed stylus files
|
- [ ] Support typed stylus files
|
||||||
|
|
||||||
@ -62,9 +69,17 @@ Stylus files location
|
|||||||
|
|
||||||
### Dev Dependencies
|
### Dev Dependencies
|
||||||
|
|
||||||
|
- @babel/core: Tests Dependency
|
||||||
|
- @babel/preset-env: Tests Dependency
|
||||||
|
- @babel/preset-react: Tests Dependency
|
||||||
|
- @types/jest: Testing Typing
|
||||||
- @types/node: Typescript Typing
|
- @types/node: Typescript Typing
|
||||||
- @types/react: Typescript Typing
|
- @types/react: Typescript Typing
|
||||||
|
- @types/react-test-renderer: Testings Typing
|
||||||
- @typescript-eslint/eslint-plugin: ESLint Typescript Plugin
|
- @typescript-eslint/eslint-plugin: ESLint Typescript Plugin
|
||||||
- @typescript-eslint/parser: ESLint Typescript parser
|
- @typescript-eslint/parser: ESLint Typescript parser
|
||||||
|
- babel-jest: Compile files for jest use
|
||||||
- eslint: ESLint
|
- eslint: ESLint
|
||||||
- eslint-plugin-react: ESLint React Plugin
|
- eslint-plugin-react: ESLint React Plugin
|
||||||
|
- jest: Jest tessting framework
|
||||||
|
- react-test-renderer: Test React components
|
||||||
|
@ -1,24 +1,33 @@
|
|||||||
const stylus = require('@zeit/next-stylus')
|
const stylus = require('@zeit/next-stylus')
|
||||||
const purgeCSS = require('next-purgecss')
|
const purgeCSS = require('next-purgecss')
|
||||||
const withPlugins = require('next-compose-plugins')
|
const withPlugins = require('next-compose-plugins')
|
||||||
|
const {PHASE_DEVELOPMENT_SERVER} = require('next/constants')
|
||||||
|
|
||||||
module.exports = withPlugins([
|
module.exports = withPlugins([
|
||||||
[stylus, {
|
[stylus, {
|
||||||
// cssModules: true
|
cssModules: true,
|
||||||
}],
|
cssLoaderOptions: {
|
||||||
[purgeCSS, {
|
localIdentName: "[hash:base64:6]",
|
||||||
purgeCssPaths: [
|
},
|
||||||
'pages/**/*',
|
[PHASE_DEVELOPMENT_SERVER]: {
|
||||||
'components/**/*',
|
cssLoaderOptions: {
|
||||||
'styl/**/*'
|
localIdentName: "[path][name]__[local]"
|
||||||
],
|
}
|
||||||
purgeCSS: {
|
|
||||||
content: [
|
|
||||||
'components/**/*.tsx',
|
|
||||||
'pages/**/*.tsx'
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
|
// [purgeCSS, {
|
||||||
|
// purgeCssPaths: [
|
||||||
|
// 'pages/**/*',
|
||||||
|
// 'components/**/*',
|
||||||
|
// 'styl/**/*'
|
||||||
|
// ],
|
||||||
|
// purgeCSS: {
|
||||||
|
// content: [
|
||||||
|
// 'components/**/*.tsx',
|
||||||
|
// 'pages/**/*.tsx'
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
|
// }],
|
||||||
], {
|
], {
|
||||||
exportTrailingSlash: true,
|
exportTrailingSlash: true,
|
||||||
plugins: [
|
plugins: [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user