Updated files

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
Florian Bouillon 2020-03-31 11:16:04 +02:00
parent f5c92b52c2
commit 21eba2d473
No known key found for this signature in database
GPG Key ID: B143FF27EF555D16
4 changed files with 63 additions and 33 deletions

View File

@ -5,4 +5,4 @@ indent_style = tab
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
insert_final_newline = true

View File

@ -40,14 +40,16 @@ module.exports = {
"error",
"unix"
],
quotes: [
"error",
"single"
],
semi: [
"error",
"never"
],
quotes: "off",
"@typescript-eslint/quotes": ["error", "single", { avoidEscape: true }],
semi: "off",
"@typescript-eslint/semi": "error",
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": [
"error",
@ -109,7 +111,13 @@ module.exports = {
"error",
"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": [
"error",
"always-multiline"
@ -168,7 +176,6 @@ module.exports = {
"no-undef-init": "error",
"no-underscore-dangle": "error",
"no-unsafe-finally": "error",
"no-unused-expressions": "error",
"no-unused-labels": "error",
"no-unused-vars": "off",
"no-var": "error",
@ -183,14 +190,13 @@ module.exports = {
"consistent-as-needed"
],
"radix": "error",
"space-before-function-paren": [
"error",
{
anonymous: "never",
asyncArrow: "always",
named: "never"
}
],
"space-before-function-paren": "off",
"@typescript-eslint/space-before-function-paren": ["error", {
asyncArrow: "always",
anonymous: "never",
named: "never"
}],
"spaced-comment": "error",
"use-isnan": "error",
"valid-typeof": "off",

View File

@ -2,6 +2,10 @@
## Folders
## __tests__
Test files to test webpage or single components
### Components
Folder where you put your React components
@ -33,11 +37,14 @@ Stylus files location
- [x] Support Typescript
- [x] Support Javascript
- [ ] Support Javascript files Linting
- [x] Unit Testing
- [ ] Lint unit tests
### Stylus
- [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 typed stylus files
@ -62,9 +69,17 @@ Stylus files location
### 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/react: Typescript Typing
- @types/react-test-renderer: Testings Typing
- @typescript-eslint/eslint-plugin: ESLint Typescript Plugin
- @typescript-eslint/parser: ESLint Typescript parser
- babel-jest: Compile files for jest use
- eslint: ESLint
- eslint-plugin-react: ESLint React Plugin
- jest: Jest tessting framework
- react-test-renderer: Test React components

View File

@ -1,24 +1,33 @@
const stylus = require('@zeit/next-stylus')
const purgeCSS = require('next-purgecss')
const withPlugins = require('next-compose-plugins')
const {PHASE_DEVELOPMENT_SERVER} = require('next/constants')
module.exports = withPlugins([
[stylus, {
// cssModules: true
}],
[purgeCSS, {
purgeCssPaths: [
'pages/**/*',
'components/**/*',
'styl/**/*'
],
purgeCSS: {
content: [
'components/**/*.tsx',
'pages/**/*.tsx'
]
cssModules: true,
cssLoaderOptions: {
localIdentName: "[hash:base64:6]",
},
[PHASE_DEVELOPMENT_SERVER]: {
cssLoaderOptions: {
localIdentName: "[path][name]__[local]"
}
}
}],
// [purgeCSS, {
// purgeCssPaths: [
// 'pages/**/*',
// 'components/**/*',
// 'styl/**/*'
// ],
// purgeCSS: {
// content: [
// 'components/**/*.tsx',
// 'pages/**/*.tsx'
// ]
// }
// }],
], {
exportTrailingSlash: true,
plugins: [