Skip to content

Commit

Permalink
update deps w/ lint-staged
Browse files Browse the repository at this point in the history
  • Loading branch information
Autapomorph committed Mar 12, 2020
1 parent dffd8c7 commit d687432
Show file tree
Hide file tree
Showing 6 changed files with 4,676 additions and 3,453 deletions.
19 changes: 16 additions & 3 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
const { CLIEngine } = require('eslint');

module.exports = {
'src/**/*.js': ['prettier --write', 'eslint --max-warnings=0', 'git add'],
'src/**/*.css': ['prettier --write', 'stylelint --fix', 'git add'],
'*.{json,md}': ['prettier --write', 'git add'],
'*.{js,jsx,ts,tsx}': filenames => {
const filenamesString = filenames.join(' ');
const eslintMatch = filenames.filter(file => !new CLIEngine({}).isPathIgnored(file)).join(' ');

return [
`prettier --write ${filenamesString}`,
`stylelint ${filenamesString}`,
`eslint --max-warnings=0 ${eslintMatch}`,
];
},

'*.{css,scss,sass,less}': ['prettier --write', 'stylelint --fix'],

'*.{json,md}': [`prettier --write`],
};
4 changes: 4 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ module.exports = {
useTabs: false,
semi: true,
singleQuote: true,
quoteProps: 'as-needed',
jsxSingleQuote: false,
trailingComma: 'all',
bracketSpacing: true,
jsxBracketSameLine: false,
arrowParens: 'avoid',
vueIndentScriptAndStyle: true,
endOfLine: 'lf',
};
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dist/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Autapomorph
Copyright (c) 2020 Autapomorph

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

1 comment on commit d687432

@vercel
Copy link

@vercel vercel bot commented on d687432 Mar 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.