Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
683486da
Unverified
Commit
683486da
authored
Feb 03, 2020
by
Joe Haddad
Committed by
GitHub
Feb 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add TypeScript Definitions for Sass (#10363)
* Add TypeScript Definitions for Sass * fix test
parent
f7880f34
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
4 deletions
+23
-4
lint-staged.config.js
lint-staged.config.js
+1
-1
package.json
package.json
+2
-2
global.d.ts
packages/next/types/global.d.ts
+10
-0
hello.module.sass
test/integration/typescript/components/hello.module.sass
+2
-0
hello.module.scss
test/integration/typescript/components/hello.module.scss
+3
-0
hello.ts
test/integration/typescript/components/hello.ts
+4
-0
next.config.js
test/integration/typescript/next.config.js
+1
-1
No files found.
lint-staged.config.js
View file @
683486da
...
...
@@ -14,7 +14,7 @@ module.exports = {
`git add
${
escapedFileNames
}
`
,
]
},
'**/*.{json,md,mdx,css,html,yml,yaml,scss
,sass
}'
:
filenames
=>
{
'**/*.{json,md,mdx,css,html,yml,yaml,scss}'
:
filenames
=>
{
const
escapedFileNames
=
filenames
.
map
(
filename
=>
`"
${
isWin
?
filename
:
escape
([
filename
])}
"`
)
.
join
(
' '
)
...
...
package.json
View file @
683486da
...
...
@@ -23,8 +23,8 @@
"lint-eslint"
:
"eslint . --ext js,jsx,ts,tsx --max-warnings=0"
,
"lint"
:
"run-p lint-typescript prettier-check lint-eslint"
,
"lint-fix"
:
"yarn prettier-fix && eslint . --ext js,jsx,ts,tsx --fix --max-warnings=0"
,
"prettier-check"
:
"prettier --check
\"
**/*.{js,jsx,json,ts,tsx,md,mdx,css,html,yml,yaml,scss
,sass
}
\"
"
,
"prettier-fix"
:
"prettier --write
\"
**/*.{js,jsx,json,ts,tsx,md,mdx,css,html,yml,yaml,scss
,sass
}
\"
"
,
"prettier-check"
:
"prettier --check
\"
**/*.{js,jsx,json,ts,tsx,md,mdx,css,html,yml,yaml,scss}
\"
"
,
"prettier-fix"
:
"prettier --write
\"
**/*.{js,jsx,json,ts,tsx,md,mdx,css,html,yml,yaml,scss}
\"
"
,
"types"
:
"lerna run types --stream"
,
"typescript"
:
"lerna run typescript"
,
"prepublish"
:
"lerna run prepublish"
,
...
...
packages/next/types/global.d.ts
View file @
683486da
...
...
@@ -15,3 +15,13 @@ declare module '*.module.css' {
const
classes
:
{
readonly
[
key
:
string
]:
string
}
export
default
classes
}
declare
module
'*.module.sass'
{
const
classes
:
{
readonly
[
key
:
string
]:
string
}
export
default
classes
}
declare
module
'*.module.scss'
{
const
classes
:
{
readonly
[
key
:
string
]:
string
}
export
default
classes
}
test/integration/typescript/components/hello.module.sass
0 → 100644
View file @
683486da
.hello
content
:
'hello'
test/integration/typescript/components/hello.module.scss
0 → 100644
View file @
683486da
.hello
{
content
:
'hello'
;
}
test/integration/typescript/components/hello.ts
View file @
683486da
import
helloStyles
from
'./hello.module.css'
import
helloStyles2
from
'./hello.module.scss'
import
helloStyles3
from
'./hello.module.sass'
export
function
hello
():
string
{
console
.
log
(
helloStyles
.
hello
)
console
.
log
(
helloStyles2
.
hello
)
console
.
log
(
helloStyles3
.
hello
)
return
'Hello'
}
test/integration/typescript/next.config.js
View file @
683486da
...
...
@@ -3,5 +3,5 @@ module.exports = {
// Make sure entries are not getting disposed.
maxInactiveAge
:
1000
*
60
*
60
,
},
experimental
:
{
css
:
true
},
experimental
:
{
s
css
:
true
},
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment