-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0ba45c7
Showing
13 changed files
with
353 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# every file | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = false | ||
|
||
# 2 space indentation | ||
[*.{html,css,js,jsx,ts,tsx,json,yml,md,vue}] | ||
indent_style = space | ||
indent_size = 2 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
/** @type {import('eslint').Linter.Config} */ | ||
module.exports = { | ||
root: true, | ||
parserOptions: { | ||
ecmaVersion: 2021, | ||
sourceType: 'module', | ||
}, | ||
|
||
/* Environment defines global variables that are predefined */ | ||
env: { | ||
es6: true, | ||
commonjs: true, | ||
node: true, | ||
}, | ||
/* Global Variables */ | ||
globals: {}, | ||
|
||
/* Third-party Plugins */ | ||
plugins: [], | ||
/* Plugins may provide processors */ | ||
processor: '', | ||
overrides: [], | ||
|
||
/* Adding Shared Settings */ | ||
settings: {}, | ||
/* Extending Configuration */ | ||
extends: [ | ||
/** | ||
* enables a subset of core rules that report common problems | ||
* @see {@link https://eslint.org/docs/user-guide/configuring#using-eslintrecommended} | ||
*/ | ||
'eslint:recommended', | ||
|
||
/** | ||
* @integration prettier | ||
* @package eslint-config-prettier | ||
* @description eslint-config-prettier is a config that disables rules that conflict with Prettie. | ||
* @package eslint-plugin-prettier | ||
* @description eslint-plugin-prettier is a plugin that adds a rule that formats content using Prettier. | ||
* @recommended eslint-plugin-prettier exposes a "recommended" configuration that configures both eslint-plugin-prettier and eslint-config-prettier in a single step. | ||
*/ | ||
'plugin:prettier/recommended', | ||
], | ||
rules: { | ||
/** | ||
* Possible Errors | ||
*/ | ||
// Disallow the use of console | ||
// "no-console": ["warn", { "allow": ["warn", "error", "log", "info"] }], | ||
// "debugger": "warn", | ||
// calling `Object.prototype` method directly on objects | ||
'no-prototype-builtins': ['off'], | ||
// Disallow template literal placeholder syntax in regular strings | ||
'no-template-curly-in-string': ['warn'], | ||
|
||
/** | ||
* Best Practices | ||
*/ | ||
// Require default cases in switch statements | ||
'default-case': ['warn'], | ||
// Enforce dot notation whenever possible | ||
'dot-notation': ['warn'], | ||
// Require the use of === and !== | ||
eqeqeq: ['warn', 'always', { null: 'ignore' }], | ||
// Disallow the use of alert, confirm, and prompt | ||
'no-alert': ['warn'], | ||
// Disallow the use of arguments.caller or arguments.callee | ||
'no-caller': ['warn'], | ||
// require or disallow strict mode directives | ||
// "strict" | ||
|
||
/** | ||
* Variables | ||
*/ | ||
// Disallow initializing variables to undefined | ||
'no-undef-init': ['warn'], | ||
// Disallow unused variables | ||
'no-unused-vars': [ | ||
'warn', | ||
{ | ||
args: 'none', | ||
caughtErrors: 'none', | ||
}, | ||
], | ||
|
||
/** | ||
* CommonJS | ||
*/ | ||
// Disallow string concatenation with __dirname and __filename | ||
'no-path-concat': ['warn'], | ||
|
||
/** | ||
* Stylistic | ||
*/ | ||
// Enforce consistent spacing after the // or \/* in a comment | ||
'spaced-comment': ['warn'], | ||
|
||
/** | ||
* ES6 | ||
*/ | ||
// Require braces in arrow function body = as-needed | ||
'arrow-body-style': ['warn'], | ||
// Disallow duplicate imports = { includeExports: false } | ||
'no-duplicate-imports': ['warn'], | ||
// Disallow unnecessary computed property keys on objects | ||
'no-useless-computed-key': ['warn'], | ||
// Require Objarrow-spacingect Literal Shorthand Syntax | ||
'object-shorthand': ['warn', 'properties'], | ||
// Suggest using const | ||
'prefer-const': [ | ||
'warn', | ||
{ | ||
destructuring: 'all', | ||
}, | ||
], | ||
// Require template literals instead of string concatenation | ||
'prefer-template': ['warn'], | ||
|
||
'prettier/prettier': ['warn'], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
miniprogram_npm/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# Mac | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package-lock = false | ||
|
||
# # https://cnpmjs.org | ||
# registry = https://registry.npm.taobao.org | ||
|
||
# # https://github.com/GoogleChrome/puppeteer | ||
# PUPPETEER_DOWNLOAD_HOST = https://npm.taobao.org/mirrors |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
module.exports = { | ||
// Specify the end of line | ||
endOfLine: 'lf', | ||
|
||
// use single quotes instead of double quotes | ||
singleQuote: true, // default = false | ||
|
||
// Change when properties in objects are quoted. | ||
quoteProps: 'as-needed', | ||
|
||
// Use single quotes instead of double quotes in JSX | ||
jsxSingleQuote: false, | ||
|
||
// Put the > of a multi-line JSX element at the end of the last line instead of being alone on the next line. | ||
jsxBracketSameLine: true, // false | ||
|
||
// Print trailing commas wherever possible when multi-line | ||
trailingComma: 'es5', | ||
|
||
// Fit code within this line limit | ||
printWidth: 80, | ||
|
||
// Specify the number of spaces per indentation-level | ||
tabWidth: 2, | ||
|
||
// Indent lines with tabs instead of spaces. | ||
useTabs: false, | ||
|
||
// semicolons at the ends of statements | ||
semi: true, | ||
|
||
// Controls the printing of spaces inside object literals | ||
bracketSpacing: true, | ||
|
||
// Include parentheses around a sole arrow function parameter | ||
arrowParens: 'avoid', // default = 'always' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. | ||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | ||
|
||
// List of extensions which should be recommended for users of this workspace. | ||
"recommendations": [ | ||
"EditorConfig.EditorConfig", | ||
"esbenp.prettier-vscode", | ||
"dbaeumer.vscode-eslint", | ||
], | ||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace. | ||
"unwantedRecommendations": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
/** | ||
* File | ||
*/ | ||
// trim trailing whitespace when saving a file. | ||
"files.trimTrailingWhitespace": true, // || .editorconfig#trim_trailing_whitespace | ||
// insert a final new line at the end of the file when saving it. | ||
"files.insertFinalNewline": true, // || .editorconfig#insert_final_newline | ||
// will trim all new lines after the final new line at the end of the file when saving it. | ||
"files.trimFinalNewlines": true, | ||
|
||
/** | ||
* Editor | ||
*/ | ||
// Render vertical rulers | ||
"editor.rulers": [80], | ||
// automatically detect `editor.tabSize` and `editor.insertSpaces` | ||
"editor.detectIndentation": true, // overridden .editorconfig | ||
// The number of spaces a tab is equal to | ||
"editor.tabSize": 2, // overridden .editorconfig | ||
// Insert spaces when pressing Tab | ||
"editor.insertSpaces": true, // overridden .editorconfig | ||
// Defines a default formatter | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
// Whether or not to take `.editorconfig` into account when parsing configuration. | ||
"prettier.useEditorConfig": true, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 zhilidali.github.io | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# stylelint-config-tailwindcss | ||
|
||
[](https://www.npmjs.org/package/stylelint-config-tailwindcss) | ||
|
||
tailwindcss shareable config for stylelint | ||
|
||
## Installation | ||
|
||
```sh | ||
npm install stylelint-config-tailwindcss --save-dev | ||
``` | ||
|
||
## Usage | ||
|
||
set your stylelint config to: | ||
|
||
```diff | ||
{ | ||
"extends": [ | ||
"eslint:recommended", | ||
+ "stylelint-config-tailwindcss" | ||
] | ||
} | ||
``` | ||
|
||
## License | ||
|
||
[MIT License](/LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = { | ||
rules: { | ||
'at-rule-no-unknown': [ | ||
true, | ||
{ | ||
ignoreAtRules: [ | ||
'tailwind', | ||
'apply', | ||
'layer', | ||
'variants', | ||
'responsive', | ||
'screen', | ||
], | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "stylelint-config-tailwindcss", | ||
"version": "0.0.1", | ||
"description": "tailwindcss shareable config for stylelint", | ||
"main": "index.js", | ||
"files": ["index.js"], | ||
"scripts": { | ||
"lint": "eslint '.' --ext .js" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^7.22.0", | ||
"eslint-config-prettier": "^8.1.0", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"prettier": "^2.2.1" | ||
}, | ||
"keywords": [ | ||
"stylelint", | ||
"stylelint-config", | ||
"tailwindcss" | ||
], | ||
"author": "[email protected]", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/zhilidali/stylelint-config-tailwindcss.git" | ||
}, | ||
"homepage": "https://github.com/zhilidali/stylelint-config-tailwindcss#readme", | ||
"bugs": { | ||
"url": "https://github.com/zhilidali/stylelint-config-tailwindcss/issues" | ||
}, | ||
"license": "MIT" | ||
} |